From 97510a7f64e94607d713171507a2fb172ecb9c3a Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 3 May 2019 18:16:09 +0300 Subject: [PATCH] stop any running back-end data retrieval when the profile is changed --- app/src/main/java/net/ktnx/mobileledger/model/Data.java | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.39.5