From: Damyan Ivanov Date: Sat, 1 Aug 2020 12:58:31 +0000 (+0300) Subject: do not force refreshing spinner during transaction description refresh X-Git-Tag: v0.15.0~77 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=ed274bd2ce338b5822406f0a52a4bfd0779bf7ae 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) --- 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"); }