]> git.ktnx.net Git - mobile-ledger.git/commitdiff
ignore refresh request when there is no profile yet
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 3 May 2020 13:05:41 +0000 (16:05 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 3 May 2020 13:05:41 +0000 (16:05 +0300)
app/src/main/java/net/ktnx/mobileledger/model/Data.java

index 1b659ff7d866485d8874b1efcfadafc5d7084186..0539c136706e54a2bbf2640b2ca51442fdbc068e 100644 (file)
@@ -148,8 +148,10 @@ public final class Data {
             return;
         }
         MobileLedgerProfile pr = profile.getValue();
             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());
 
         retrieveTransactionsTask =
                 new RetrieveTransactionsTask(new WeakReference<>(activity), profile.getValue());