cloudroam
2025-04-01 661a264fef5d1a23ba850c9f65ac79c0127b3d1d
app/src/main/java/com/example/firstapp/utils/PreferencesManager.kt
@@ -7,6 +7,7 @@
    private const val PREF_NAME = "app_preferences"
    private const val KEY_TOKEN = "user_token"
    private const val KEY_PHONE = "user_phone"
    private const val KEY_FIRST_INSTALL = "first_install"
    private lateinit var preferences: SharedPreferences
@@ -37,4 +38,12 @@
            apply()
        }
    }
    fun isFirstInstall(): Boolean {
        return preferences.getBoolean(KEY_FIRST_INSTALL, true)
    }
    fun setFirstInstall(isFirst: Boolean) {
        preferences.edit().putBoolean(KEY_FIRST_INSTALL, isFirst).apply()
    }