That fuck shit the fascists are using
1package org.tm.archive.keyvalue
2
3import androidx.annotation.VisibleForTesting
4
5/**
6 * Values for managing enable/disable state and corresponding alerts for Notification Profiles.
7 */
8internal class NotificationProfileValues(store: KeyValueStore) : SignalStoreValues(store) {
9
10 companion object {
11 private const val KEY_LAST_PROFILE_POPUP = "np.last_profile_popup"
12 private const val KEY_LAST_PROFILE_POPUP_TIME = "np.last_profile_popup_time"
13 private const val KEY_SEEN_TOOLTIP = "np.seen_tooltip"
14
15 @VisibleForTesting
16 const val KEY_MANUALLY_ENABLED_PROFILE = "np.manually_enabled_profile"
17
18 @VisibleForTesting
19 const val KEY_MANUALLY_ENABLED_UNTIL = "np.manually_enabled_until"
20
21 @VisibleForTesting
22 const val KEY_MANUALLY_DISABLED_AT = "np.manually_disabled_at"
23 }
24
25 override fun onFirstEverAppLaunch() = Unit
26
27 override fun getKeysToIncludeInBackup(): MutableList<String> {
28 return mutableListOf(KEY_SEEN_TOOLTIP)
29 }
30
31 var manuallyEnabledProfile: Long by longValue(KEY_MANUALLY_ENABLED_PROFILE, 0L)
32 var manuallyEnabledUntil: Long by longValue(KEY_MANUALLY_ENABLED_UNTIL, 0L)
33 var manuallyDisabledAt: Long by longValue(KEY_MANUALLY_DISABLED_AT, 0L)
34
35 var lastProfilePopup: Long by longValue(KEY_LAST_PROFILE_POPUP, 0L)
36 var lastProfilePopupTime: Long by longValue(KEY_LAST_PROFILE_POPUP_TIME, 0L)
37 var hasSeenTooltip: Boolean by booleanValue(KEY_SEEN_TOOLTIP, false)
38}