From 02cd3a6cba1e55c8e21dc0f71a02baa26722354f Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 22 Aug 2021 19:18:58 +0300 Subject: [PATCH] Date.setCurrentProfile may accept null as argument for example when the last profile has been removed --- app/src/main/java/net/ktnx/mobileledger/model/Data.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) { -- 2.39.2