1
0
mirror of https://github.com/etesync/android synced 2024-11-15 20:38:58 +00:00

Journals: support adding back deleted journals.

This currently just adds the journal back, but doesn't re-apply the
journal, so the calendar for example would be empty, but the journal
itself would be listed and visible.
This commit is contained in:
Tom Hacohen 2017-04-19 13:57:12 +01:00
parent d3057f86f0
commit 4c47384198

View File

@ -201,6 +201,7 @@ public abstract class SyncAdapterService extends Service {
JournalEntity journalEntity = JournalEntity.fetchOrCreate(data, collection); JournalEntity journalEntity = JournalEntity.fetchOrCreate(data, collection);
journalEntity.setOwner(journal.getOwner()); journalEntity.setOwner(journal.getOwner());
journalEntity.setEncryptedKey(journal.getKey()); journalEntity.setEncryptedKey(journal.getKey());
journalEntity.setDeleted(false);
data.upsert(journalEntity); data.upsert(journalEntity);
existing.remove(collection.uid); existing.remove(collection.uid);