Fix unreliable Preferences from Account Source (#798)

* Create empty Preferences object on error

* Update prefs from account when preferences fails
This commit is contained in:
Jacoco 2023-09-01 21:28:02 +02:00 committed by GitHub
parent 807010893a
commit 53369eb2d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,9 @@ public class AccountSession{
@Override
public void onError(ErrorResponse error){
Log.w(TAG, "Failed to load preferences for account "+getID()+": "+error);
if (preferences==null)
preferences=new Preferences();
preferencesFromAccountSource(self);
}
})
.exec(getID());