mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +00:00
JournalModel: don't convert to list when getting collections.
Just use the iterator we get back already.
This commit is contained in:
parent
da87d14ae9
commit
190ec89c2c
@ -54,8 +54,7 @@ public class JournalModel {
|
||||
public static List<CollectionInfo> getCollections(EntityDataStore<Persistable> data, long service) {
|
||||
List<CollectionInfo> ret = new LinkedList<>();
|
||||
|
||||
List<JournalEntity> journals = data.select(JournalEntity.class).where(JournalEntity.SERVICE.eq(service).and(JournalEntity.DELETED.eq(false))).get().toList();
|
||||
for (JournalEntity journal : journals) {
|
||||
for (JournalEntity journal : data.select(JournalEntity.class).where(JournalEntity.SERVICE.eq(service).and(JournalEntity.DELETED.eq(false))).get()) {
|
||||
// FIXME: For some reason this isn't always being called, manually do it here.
|
||||
journal.afterLoad();
|
||||
ret.add(journal.getInfo());
|
||||
|
Loading…
Reference in New Issue
Block a user