Fixed metadata bugs when creating a new list after becoming unauthorized

pull/14/head
Sam Bosley 12 years ago
parent d97f5c2a06
commit 7ad6d441b0

@ -400,6 +400,7 @@ public class TagViewFragment extends TaskListFragment {
android.R.drawable.ic_dialog_alert, android.R.drawable.ic_dialog_alert,
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
String oldUuid = tagData.getUuid();
tagData.setValue(TagData.DELETION_DATE, DateUtilities.now()); tagData.setValue(TagData.DELETION_DATE, DateUtilities.now());
tagData.putTransitory(SyncFlags.ACTFM_SUPPRESS_OUTSTANDING_ENTRIES, true); tagData.putTransitory(SyncFlags.ACTFM_SUPPRESS_OUTSTANDING_ENTRIES, true);
tagDataDao.saveExisting(tagData); tagDataDao.saveExisting(tagData);
@ -426,6 +427,7 @@ public class TagViewFragment extends TaskListFragment {
} finally { } finally {
tasks.close(); tasks.close();
} }
tagService.deleteTagMetadata(oldUuid);
Filter newFilter = TagFilterExposer.filterFromTagData(tla, tagData); Filter newFilter = TagFilterExposer.filterFromTagData(tla, tagData);
tla.onFilterItemClicked(newFilter); tla.onFilterItemClicked(newFilter);

@ -531,7 +531,7 @@ public final class TagService {
return null; return null;
} }
private int deleteTagMetadata(String uuid) { public int deleteTagMetadata(String uuid) {
Metadata deleted = new Metadata(); Metadata deleted = new Metadata();
deleted.setValue(Metadata.DELETION_DATE, DateUtilities.now()); deleted.setValue(Metadata.DELETION_DATE, DateUtilities.now());

Loading…
Cancel
Save