From: Damyan Ivanov Date: Sun, 3 May 2020 13:05:41 +0000 (+0300) Subject: ignore refresh request when there is no profile yet X-Git-Tag: v0.12.0~11 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=213321a245aa6f57715985104e96a354594903db;p=mobile-ledger.git ignore refresh request when there is no profile yet --- diff --git a/app/src/main/java/net/ktnx/mobileledger/model/Data.java b/app/src/main/java/net/ktnx/mobileledger/model/Data.java index 1b659ff7..0539c136 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Data.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Data.java @@ -148,8 +148,10 @@ public final class Data { return; } MobileLedgerProfile pr = profile.getValue(); - if (pr == null) - throw new IllegalStateException("No current profile"); + if (pr == null) { + Logger.debug("ui", "Ignoring refresh -- no current profile"); + return; + } retrieveTransactionsTask = new RetrieveTransactionsTask(new WeakReference<>(activity), profile.getValue());