android: MainActivity: Move theme setup to after settings initialization.

- Fixes a crash.
This commit is contained in:
bunnei 2020-04-21 21:58:45 -04:00
parent d488620fb5
commit 25e95aa774

View File

@ -48,12 +48,14 @@ public final class MainActivity extends AppCompatActivity implements MainView {
mPresenter.onCreate();
if (savedInstanceState == null) {
ThemeUtil.applyTheme();
StartupHandler.HandleInit(this);
if (PermissionsHandler.hasWriteAccess(this)) {
mPlatformGamesFragment = new PlatformGamesFragment();
getSupportFragmentManager().beginTransaction().add(mFrameLayoutId, mPlatformGamesFragment)
.commit();
// Apply current theme setting
ThemeUtil.applyTheme();
}
} else {
mPlatformGamesFragment = (PlatformGamesFragment) getSupportFragmentManager().getFragment(savedInstanceState, "mPlatformGamesFragment");