Updated on 2026-08-14
This commit is contained in:
parent
43387c838d
commit
0c8852a374
3 changed files with 36 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ import android.content.Context
|
|||
import android.content.SharedPreferences
|
||||
import androidx.core.content.edit
|
||||
import com.tangem.common.json.MoshiJsonConverter
|
||||
import java.util.Calendar
|
||||
import java.util.*
|
||||
|
||||
|
||||
class PreferencesStorage(applicationContext: Application) {
|
||||
|
|
@ -25,6 +25,10 @@ class PreferencesStorage(applicationContext: Application) {
|
|||
fiatCurrenciesPrefStorage.migrate()
|
||||
}
|
||||
|
||||
var chatFirstLaunchTime: Long?
|
||||
get() = preferences.getLong(CHAT_FIRST_LAUNCH_KEY, 0).takeIf { it != 0L }
|
||||
set(value) = preferences.edit { putLong(CHAT_FIRST_LAUNCH_KEY, value ?: 0) }
|
||||
|
||||
fun getCountOfLaunches(): Int = preferences.getInt(APP_LAUNCH_COUNT_KEY, 1)
|
||||
|
||||
@Deprecated("Use UsedCardsPrefStorage instead")
|
||||
|
|
@ -58,6 +62,7 @@ class PreferencesStorage(applicationContext: Application) {
|
|||
private const val DISCLAIMER_ACCEPTED_KEY = "disclaimerAccepted"
|
||||
private const val TWINS_ONBOARDING_SHOWN_KEY = "twinsOnboardingShown"
|
||||
private const val APP_LAUNCH_COUNT_KEY = "launchCount"
|
||||
private const val CHAT_FIRST_LAUNCH_KEY = "chatFirstLaunchKey"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue