1
0
mirror of https://github.com/etesync/android synced 2025-01-11 00:01:12 +00:00

Revert "Update requery and remove the afterLoad workaround."

Unfortunately this requery version introduced a regression. When adding
a new account, it takes syncign a few times until it works. It looks
like requery is not loading the recently saved instances.

This reverts commit f0f70ff1c61996d0e45d8f72d24654c739c325f7.
This commit is contained in:
Tom Hacohen 2017-04-13 10:04:47 +01:00
parent 57f447d372
commit 8f1f4785a6
2 changed files with 9 additions and 3 deletions

View File

@ -130,9 +130,9 @@ dependencies {
transitive=true
}
compile 'io.requery:requery:1.3.0'
compile 'io.requery:requery-android:1.3.0'
annotationProcessor 'io.requery:requery-processor:1.3.0'
compile 'io.requery:requery:1.2.0'
compile 'io.requery:requery-android:1.2.0'
annotationProcessor 'io.requery:requery-processor:1.2.0'
compile group: 'com.madgag.spongycastle', name: 'core', version: '1.54.0.0'
compile group: 'com.madgag.spongycastle', name: 'prov', version: '1.54.0.0'

View File

@ -56,6 +56,8 @@ public class JournalModel {
List<JournalEntity> journals = data.select(JournalEntity.class).where(JournalEntity.SERVICE.eq(service).and(JournalEntity.DELETED.eq(false))).get().toList();
for (JournalEntity journal : journals) {
// FIXME: For some reason this isn't always being called, manually do it here.
journal.afterLoad();
ret.add(journal.getInfo());
}
@ -64,6 +66,10 @@ public class JournalModel {
public static JournalEntity fetch(EntityDataStore<Persistable> data, String url) {
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;
}