X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Factivity%2FMainActivity.java;h=cb7cb46c520ea173da9bbd15c71a4bcf9e88d5e0;hp=9f6233bc2e8bbd7fd53e302842fedfdfdb8265b2;hb=faa01b22a0f23efe6302d4787c244bb4f241b8da;hpb=68603fc7e81b17c2808c8ad372d6c983aecf5e3a diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 9f6233bc..cb7cb46c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -411,11 +411,7 @@ public class MainActivity extends ProfileThemedActivity implements FabManager.Fa * called when the current profile has changed */ private void onProfileChanged(@Nullable Profile newProfile) { - if (this.profile == null) { - if (newProfile == null) - return; - } - else { + if (this.profile != null) { if (this.profile.equals(newProfile)) return; } @@ -427,7 +423,7 @@ public class MainActivity extends ProfileThemedActivity implements FabManager.Fa else setTitle(R.string.app_name); - int newProfileTheme = haveProfile ? newProfile.getTheme() : -1; + int newProfileTheme = haveProfile ? newProfile.getTheme() : Colors.DEFAULT_HUE_DEG; if (newProfileTheme != Colors.profileThemeId) { Logger.debug("profiles", String.format(Locale.ENGLISH, "profile theme %d → %d", Colors.profileThemeId,