Fixed sync failure when login not loaded
This commit is contained in:
@@ -68,6 +68,7 @@ public class KVVSyncAdapter extends AbstractThreadedSyncAdapter {
|
||||
}, context);
|
||||
mQueue.add(() -> {
|
||||
mKVV.account().restoreOnlineLogin(bool -> {
|
||||
log.d("restored");
|
||||
mQueue.next();
|
||||
});
|
||||
});
|
||||
@@ -85,9 +86,11 @@ public class KVVSyncAdapter extends AbstractThreadedSyncAdapter {
|
||||
String authority,
|
||||
ContentProviderClient provider,
|
||||
SyncResult syncResult) {
|
||||
if (!mKVV.account().isLoggedIn())
|
||||
return;
|
||||
mQueue.add(() -> {
|
||||
if (!mKVV.account().isLoggedIn()) {
|
||||
log.w("Not logged in!");
|
||||
return;
|
||||
}
|
||||
mKVV.modules().list().reloadIfOutdated();
|
||||
mKVV.modules().list().recv(success -> {
|
||||
Iterator<Modules.Module> iterator = success.latestSemesterIterator();
|
||||
|
||||
Reference in New Issue
Block a user