From 83ef63e94b8072ef55117eccd381f4cf2804f2cd Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 25 Apr 2017 16:54:04 +0100 Subject: [PATCH] Remove getCollections and add the afterLoad workaround to getJournals. --- .../com/etesync/syncadapter/model/JournalModel.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/etesync/syncadapter/model/JournalModel.java b/app/src/main/java/com/etesync/syncadapter/model/JournalModel.java index 7e6b4fe3..06c1adf4 100644 --- a/app/src/main/java/com/etesync/syncadapter/model/JournalModel.java +++ b/app/src/main/java/com/etesync/syncadapter/model/JournalModel.java @@ -68,19 +68,11 @@ public class JournalModel { } public static List getJournals(EntityDataStore data, ServiceEntity serviceEntity) { - return data.select(JournalEntity.class).where(JournalEntity.SERVICE_MODEL.eq(serviceEntity).and(JournalEntity.DELETED.eq(false))).get().toList(); - } - - public static List getCollections(EntityDataStore data, ServiceEntity serviceEntity) { - List ret = new LinkedList<>(); - - List journals = getJournals(data, serviceEntity); - for (JournalEntity journal : journals) { + List ret = data.select(JournalEntity.class).where(JournalEntity.SERVICE_MODEL.eq(serviceEntity).and(JournalEntity.DELETED.eq(false))).get().toList(); + for (JournalEntity journal : ret) { // FIXME: For some reason this isn't always being called, manually do it here. journal.afterLoad(); - ret.add(journal.getInfo()); } - return ret; }