From e297bc15e35d5b10c0c2971e18cef7e439ff5f0a Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 5 Jan 2019 12:12:38 +0000 Subject: [PATCH] =?utf8?q?if(!isCancelled)=20=E2=86=92=20throwIfCancelled(?= =?utf8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../mobileledger/async/RetrieveTransactionsTask.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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(); -- 2.39.5