mirror of
https://github.com/etesync/android
synced 2025-01-23 06:01:01 +00:00
Journal model: call the postLoad callback on fetch too.
It's really annoying that it doesn't do it automatically as it should, in the meanwhile, add this workaround. I reported it to upstream: https://github.com/requery/requery/issues/487
This commit is contained in:
parent
415d5d5447
commit
0cd57851ad
@ -65,7 +65,12 @@ public class JournalModel {
|
||||
}
|
||||
|
||||
public static JournalEntity fetch(EntityDataStore<Persistable> data, String url) {
|
||||
return data.select(JournalEntity.class).where(JournalEntity.UID.eq(url)).limit(1).get().firstOrNull();
|
||||
JournalEntity ret = data.select(JournalEntity.class).where(JournalEntity.UID.eq(url)).limit(1).get().firstOrNull();
|
||||
if (ret != null) {
|
||||
// FIXME: For some reason this isn't always being called, manually do it here.
|
||||
ret.afterLoad();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static JournalEntity fetchOrCreate(EntityDataStore<Persistable> data, CollectionInfo collection) {
|
||||
|
Loading…
Reference in New Issue
Block a user