mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-06 18:57:26 +01:00
Fix flashing screen on the MainActivity when changing the anonymous instance
This commit is contained in:
parent
5cdda037b2
commit
d5fff14cb0
@ -365,7 +365,8 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
||||
super.onResume();
|
||||
if (mAccessToken == null) {
|
||||
String instancePreference = mSharedPreferences.getString(SharedPreferencesUtils.ANONYMOUS_ACCOUNT_INSTANCE, APIUtils.API_BASE_URI);
|
||||
if (!mRetrofit.getBaseURL().equalsIgnoreCase(instancePreference)) {
|
||||
if (!instancePreference.startsWith(mRetrofit.getBaseURL())) {
|
||||
mRetrofit.setBaseURL(instancePreference);
|
||||
this.recreate();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user