From ed274bd2ce338b5822406f0a52a4bfd0779bf7ae Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 1 Aug 2020 15:58:31 +0300 Subject: [PATCH] do not force refreshing spinner during transaction description refresh it appears as if the general refresh runs twice and transaction description runs in non-exclusive transaction and doesn't interfere with e.g. new transaction entry (where there is a lookup for transaction descriptions) --- .../ktnx/mobileledger/async/RefreshDescriptionsTask.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/async/RefreshDescriptionsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/RefreshDescriptionsTask.java index 4276e97d..50e70479 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/RefreshDescriptionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/RefreshDescriptionsTask.java @@ -1,5 +1,5 @@ /* - * Copyright © 2019 Damyan Ivanov. + * Copyright © 2020 Damyan Ivanov. * This file is part of MoLe. * MoLe is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -22,7 +22,6 @@ import android.database.sqlite.SQLiteDatabase; import android.os.AsyncTask; import net.ktnx.mobileledger.App; -import net.ktnx.mobileledger.model.Data; import java.util.HashMap; import java.util.Map; @@ -37,7 +36,7 @@ public class RefreshDescriptionsTask extends AsyncTask { debug("descriptions", "Starting refresh"); SQLiteDatabase db = App.getDatabase(); - Data.backgroundTaskStarted(); +// Data.backgroundTaskStarted(); try { db.beginTransactionNonExclusive(); try { @@ -65,7 +64,7 @@ public class RefreshDescriptionsTask extends AsyncTask { } } finally { - Data.backgroundTaskFinished(); +// Data.backgroundTaskFinished(); debug("descriptions", "Refresh done"); } -- 2.39.2