]> git.ktnx.net Git - mobile-ledger.git/commitdiff
Date.setCurrentProfile may accept null as argument
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 22 Aug 2021 16:18:58 +0000 (19:18 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 22 Aug 2021 16:18:58 +0000 (19:18 +0300)
for example when the last profile has been removed

app/src/main/java/net/ktnx/mobileledger/model/Data.java

index 886f7b07fd3dc744f6f646bdc7f43df4b4c0d989..91a3e6d663881474bbe6231ad0564b063226e380 100644 (file)
@@ -17,7 +17,6 @@
 
 package net.ktnx.mobileledger.model;
 
-import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.lifecycle.LifecycleOwner;
 import androidx.lifecycle.LiveData;
@@ -96,10 +95,10 @@ public final class Data {
                         cnt));
         backgroundTasksRunning.postValue(cnt > 0);
     }
-    public static void setCurrentProfile(@NonNull Profile newProfile) {
+    public static void setCurrentProfile(Profile newProfile) {
         profile.setValue(newProfile);
     }
-    public static void postCurrentProfile(@NonNull Profile newProfile) {
+    public static void postCurrentProfile(Profile newProfile) {
         profile.postValue(newProfile);
     }
     public static void refreshCurrencyData(Locale locale) {