mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
fix blank state after restart
This commit is contained in:
parent
c00be08606
commit
6de4943f8e
1 changed files with 9 additions and 0 deletions
|
|
@ -182,6 +182,15 @@ public class MainActivity extends BaseActivity implements HabitRPGUserCallback.O
|
|||
this.mAPIHelper.retrieveUser(new HabitRPGUserCallback(this));
|
||||
}
|
||||
}
|
||||
|
||||
//after the activity has been stopped and is thereafter resumed,
|
||||
//a state can arise in which the active fragment no longer has a
|
||||
//reference to the tabLayout (and all its adapters are null).
|
||||
//Recreate the fragment as a result.
|
||||
if (activeFragment != null && activeFragment.tabLayout == null){
|
||||
activeFragment = null;
|
||||
drawer.setSelectionAtPosition(1);
|
||||
}
|
||||
}
|
||||
|
||||
private void setupCheckout() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue