From 4cfc87a40bc3d43417401c56d42834bfdfa1236d Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 21 Jan 2024 20:32:29 +0900 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=9B=9E=E8=B5=B7=E5=8B=95=E3=83=95?= =?UTF-8?q?=E3=83=A9=E3=82=B0=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/utils/impl/SharedPrefUtilsImpl.java | 10 ++++++++++ .../nem/lacerta/utils/repository/SharedPrefUtils.java | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/utils/src/main/java/one/nem/lacerta/utils/impl/SharedPrefUtilsImpl.java b/utils/src/main/java/one/nem/lacerta/utils/impl/SharedPrefUtilsImpl.java index 82301a64..07f3f012 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/impl/SharedPrefUtilsImpl.java +++ b/utils/src/main/java/one/nem/lacerta/utils/impl/SharedPrefUtilsImpl.java @@ -50,4 +50,14 @@ public class SharedPrefUtilsImpl implements SharedPrefUtils{ public void setFeatureSwitchOverride(FeatureSwitchOverride featureSwitchOverride, boolean value) { getEditor().putBoolean(featureSwitchOverride.getKey(), value).apply(); } + + @Override + public boolean getIsFirstLaunch() { + return getSharedPreferences().getBoolean("isFirstLaunch", true); + } + + @Override + public void setIsFirstLaunch(boolean value) { + getEditor().putBoolean("isFirstLaunch", value).apply(); + } } diff --git a/utils/src/main/java/one/nem/lacerta/utils/repository/SharedPrefUtils.java b/utils/src/main/java/one/nem/lacerta/utils/repository/SharedPrefUtils.java index 36a0c49c..ac807157 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/repository/SharedPrefUtils.java +++ b/utils/src/main/java/one/nem/lacerta/utils/repository/SharedPrefUtils.java @@ -19,4 +19,8 @@ public interface SharedPrefUtils { boolean getFeatureSwitchOverride(FeatureSwitchOverride featureSwitchOverride); void setFeatureSwitchOverride(FeatureSwitchOverride featureSwitchOverride, boolean value); + + boolean getIsFirstLaunch(); + + void setIsFirstLaunch(boolean value); }