From: Damyan Ivanov Date: Thu, 7 Mar 2019 04:58:43 +0000 (+0200) Subject: try{} needs to be immediately after incrementing the background task count X-Git-Tag: v0.8~28 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=401c522d57de54644de32a1831e1efa9608eec7b;p=mobile-ledger.git try{} needs to be immediately after incrementing the background task count --- diff --git a/app/src/main/java/net/ktnx/mobileledger/async/UpdateAccountsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/UpdateAccountsTask.java index cff03a28..64a5559a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/UpdateAccountsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/UpdateAccountsTask.java @@ -31,9 +31,9 @@ import java.util.ArrayList; public class UpdateAccountsTask extends AsyncTask> { protected ArrayList doInBackground(Void... params) { Data.backgroundTaskCount.incrementAndGet(); - String profileUUID = Data.profile.get().getUuid(); - boolean onlyStarred = Data.optShowOnlyStarred.get(); try { + String profileUUID = Data.profile.get().getUuid(); + boolean onlyStarred = Data.optShowOnlyStarred.get(); ArrayList newList = new ArrayList<>(); String sql = "SELECT name, hidden FROM accounts WHERE profile = ?";