From ee9dd748619dfc797517e25ac74e43ee6234067c Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Wed, 20 May 2020 23:54:16 +0300 Subject: [PATCH] Data.setCurrentProfile: use setValue() instead of postValue() this is used in places that need the change now, not at some later point for example, on profile change, which triggers activity recreation/theme change --- app/src/main/java/net/ktnx/mobileledger/model/Data.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/model/Data.java b/app/src/main/java/net/ktnx/mobileledger/model/Data.java index 0539c136..0bdbb1a2 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Data.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Data.java @@ -76,7 +76,7 @@ public final class Data { public static void setCurrentProfile(MobileLedgerProfile newProfile) { MLDB.setOption(MLDB.OPT_PROFILE_UUID, (newProfile == null) ? null : newProfile.getUuid()); stopTransactionsRetrieval(); - profile.postValue(newProfile); + profile.setValue(newProfile); } public static int getProfileIndex(MobileLedgerProfile profile) { try (LockHolder ignored = profilesLocker.lockForReading()) { -- 2.39.5