From: Damyan Ivanov Date: Fri, 3 May 2019 15:16:09 +0000 (+0300) Subject: stop any running back-end data retrieval when the profile is changed X-Git-Tag: v0.10.0~54 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;ds=sidebyside;h=97510a7f64e94607d713171507a2fb172ecb9c3a;hp=be3bfabca0462fc0c8ca7ab241da304b68971056;p=mobile-ledger.git stop any running back-end data retrieval when the profile is changed --- 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 64804aeb..cc35638e 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Data.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Data.java @@ -71,6 +71,7 @@ public final class Data { } public static void setCurrentProfile(MobileLedgerProfile newProfile) { MLDB.setOption(MLDB.OPT_PROFILE_UUID, newProfile.getUuid()); + stopTransactionsRetrieval(); profile.postValue(newProfile); } public static int getProfileIndex(MobileLedgerProfile profile) {