]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
Data: migrate profile to a private variable, provide methods for accessing it
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / MainActivity.java
index 33bcbb005c32a855819091f4bedebf21b4a1d802..72ace25ba1077159a79df6a64ceafe21d7ddc7df 100644 (file)
@@ -171,7 +171,7 @@ public class MainActivity extends ProfileThemedActivity {
         mToolbar = findViewById(R.id.toolbar);
         setSupportActionBar(mToolbar);
 
-        Data.profile.observe(this, this::onProfileChanged);
+        Data.observeProfile(this, this::onProfileChanged);
 
         Data.profiles.observe(this, this::onProfileListChanged);
 
@@ -468,7 +468,7 @@ public class MainActivity extends ProfileThemedActivity {
         storeThemeIdInPrefs(profile.getThemeHue());
 
         // un-hook all observed LiveData
-        Data.profile.removeObservers(this);
+        Data.removeProfileObservers(this);
         Data.profiles.removeObservers(this);
         Data.lastUpdateDate.removeObservers(this);