From: Damyan Ivanov Date: Sun, 22 Aug 2021 16:18:58 +0000 (+0300) Subject: Date.setCurrentProfile may accept null as argument X-Git-Tag: v0.20.0~5 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=02cd3a6cba1e55c8e21dc0f71a02baa26722354f;p=mobile-ledger.git Date.setCurrentProfile may accept null as argument for example when the last profile has been removed --- 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 886f7b07..91a3e6d6 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Data.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Data.java @@ -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) {