Fix for situation where tags would get wiped on first sync

pull/14/head
Tim Su 14 years ago
parent e775701320
commit 38057d321a

@ -4,7 +4,7 @@
<booleanAttribute key="ch.zork.quicklaunch" value="true"/>
<stringAttribute key="ch.zork.quicklaunch.icon" value="14.gif"/>
<intAttribute key="ch.zork.quicklaunch.index" value="0"/>
<stringAttribute key="ch.zork.quicklaunch.mode" value="run"/>
<stringAttribute key="ch.zork.quicklaunch.mode" value="debug"/>
<intAttribute key="com.android.ide.eclipse.adt.action" value="0"/>
<stringAttribute key="com.android.ide.eclipse.adt.avd" value="evo-8-google"/>
<stringAttribute key="com.android.ide.eclipse.adt.commandline" value="-scale 0.7"/>

@ -38,11 +38,12 @@ public class MilkPreferences extends TodorooPreferences {
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if(hasFocus)
if(hasFocus) {
AndroidUtilities.setCurrentlyActive(this);
initializePreference(getPreferenceScreen());
}
}
/**
*
* @param resource

@ -147,8 +147,11 @@ public final class MilkDataService {
MetadataCriteria.withKey(TagService.KEY))));
task.metadata.add(MilkTask.create(task));
for(Metadata metadata : task.metadata) {
// we need to merge because we've deleted the underlying objects,
// meaning we need to treat these as fresh objects to be saved
metadata.mergeWith(metadata.getMergedValues());
metadata.setValue(Metadata.TASK, task.task.getId());
metadataDao.persist(metadata);
metadataDao.createNew(metadata);
}
}

@ -298,6 +298,8 @@ public class TaskAdapter extends CursorAdapter {
return;
}
viewHolder.details.setText(""); //$NON-NLS-1$
// request details
Intent broadcastIntent = new Intent(AstridApiConstants.BROADCAST_REQUEST_DETAILS);
broadcastIntent.putExtra(AstridApiConstants.EXTRAS_TASK_ID, taskId);

@ -28,7 +28,7 @@ public final class Constants {
/**
* Whether to turn on debugging logging and UI
*/
public static final boolean DEBUG = false;
public static final boolean DEBUG = true;
// --- notification id's

Loading…
Cancel
Save