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:
parent
807010893a
commit
53369eb2d4
|
@ -146,6 +146,9 @@ public class AccountSession{
|
||||||
@Override
|
@Override
|
||||||
public void onError(ErrorResponse error){
|
public void onError(ErrorResponse error){
|
||||||
Log.w(TAG, "Failed to load preferences for account "+getID()+": "+error);
|
Log.w(TAG, "Failed to load preferences for account "+getID()+": "+error);
|
||||||
|
if (preferences==null)
|
||||||
|
preferences=new Preferences();
|
||||||
|
preferencesFromAccountSource(self);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.exec(getID());
|
.exec(getID());
|
||||||
|
|
Loading…
Reference in New Issue