mirror of
https://github.com/etesync/android
synced 2025-07-26 08:28:11 +00:00
Remove getCollections and add the afterLoad workaround to getJournals.
This commit is contained in:
parent
589f81c50d
commit
83ef63e94b
@ -68,19 +68,11 @@ public class JournalModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static List<JournalEntity> getJournals(EntityDataStore<Persistable> data, ServiceEntity serviceEntity) {
|
public static List<JournalEntity> getJournals(EntityDataStore<Persistable> data, ServiceEntity serviceEntity) {
|
||||||
return data.select(JournalEntity.class).where(JournalEntity.SERVICE_MODEL.eq(serviceEntity).and(JournalEntity.DELETED.eq(false))).get().toList();
|
List<JournalEntity> ret = data.select(JournalEntity.class).where(JournalEntity.SERVICE_MODEL.eq(serviceEntity).and(JournalEntity.DELETED.eq(false))).get().toList();
|
||||||
}
|
for (JournalEntity journal : ret) {
|
||||||
|
|
||||||
public static List<CollectionInfo> getCollections(EntityDataStore<Persistable> data, ServiceEntity serviceEntity) {
|
|
||||||
List<CollectionInfo> ret = new LinkedList<>();
|
|
||||||
|
|
||||||
List<JournalEntity> journals = getJournals(data, serviceEntity);
|
|
||||||
for (JournalEntity journal : journals) {
|
|
||||||
// FIXME: For some reason this isn't always being called, manually do it here.
|
// FIXME: For some reason this isn't always being called, manually do it here.
|
||||||
journal.afterLoad();
|
journal.afterLoad();
|
||||||
ret.add(journal.getInfo());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user