From: Damyan Ivanov Date: Sat, 5 Jan 2019 12:12:38 +0000 (+0000) Subject: if(!isCancelled) → throwIfCancelled() X-Git-Tag: v0.3~126 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=e297bc15e35d5b10c0c2971e18cef7e439ff5f0a;p=mobile-ledger.git if(!isCancelled) → throwIfCancelled() --- diff --git a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java index cf3e476d..601e7eca 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java @@ -302,10 +302,11 @@ public class RetrieveTransactionsTask extends String.format("Unknown parser updating %s", state.name())); } } - if (!isCancelled()) { - db.execSQL("DELETE FROM transactions WHERE keep = 0"); - db.setTransactionSuccessful(); - } + + throwIfCancelled(); + + db.execSQL("DELETE FROM transactions WHERE keep = 0"); + db.setTransactionSuccessful(); } finally { db.endTransaction();