android: MainActivity: Move theme setup to after settings initialization.
- Fixes a crash.
This commit is contained in:
parent
d488620fb5
commit
25e95aa774
@ -48,12 +48,14 @@ public final class MainActivity extends AppCompatActivity implements MainView {
|
|||||||
mPresenter.onCreate();
|
mPresenter.onCreate();
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
ThemeUtil.applyTheme();
|
|
||||||
StartupHandler.HandleInit(this);
|
StartupHandler.HandleInit(this);
|
||||||
if (PermissionsHandler.hasWriteAccess(this)) {
|
if (PermissionsHandler.hasWriteAccess(this)) {
|
||||||
mPlatformGamesFragment = new PlatformGamesFragment();
|
mPlatformGamesFragment = new PlatformGamesFragment();
|
||||||
getSupportFragmentManager().beginTransaction().add(mFrameLayoutId, mPlatformGamesFragment)
|
getSupportFragmentManager().beginTransaction().add(mFrameLayoutId, mPlatformGamesFragment)
|
||||||
.commit();
|
.commit();
|
||||||
|
|
||||||
|
// Apply current theme setting
|
||||||
|
ThemeUtil.applyTheme();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mPlatformGamesFragment = (PlatformGamesFragment) getSupportFragmentManager().getFragment(savedInstanceState, "mPlatformGamesFragment");
|
mPlatformGamesFragment = (PlatformGamesFragment) getSupportFragmentManager().getFragment(savedInstanceState, "mPlatformGamesFragment");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user