From: Damyan Ivanov Date: Mon, 28 Dec 2020 11:39:54 +0000 (+0200) Subject: ProfileThemedActivity: track current profile changes X-Git-Tag: v0.16.0~9 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=c392329991fffc8aee0a7e888f68784976e473de;p=mobile-ledger.git ProfileThemedActivity: track current profile changes needed by the new transaction activity which uses the mProfile value (and its getApiVersion()) when saving the transaction. The API version could have been changed by the "possible API version mismatch" dialog, which may be used to open the profile editor --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileThemedActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileThemedActivity.java index 81450c9a..745e888a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileThemedActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileThemedActivity.java @@ -41,6 +41,11 @@ public class ProfileThemedActivity extends CrashReportingActivity { protected void onCreate(@Nullable Bundle savedInstanceState) { initProfile(); setupProfileColors(); + Data.observeProfile(this, profile -> { + mProfile = profile; + setupProfileColors(); + }); + super.onCreate(savedInstanceState); } protected void initProfile() {