| | |
| | | private const val KEY_FIRST_INSTALL = "first_install" |
| | | private const val LAST_LOGIN_PHONE = "last_login_phone" |
| | | private const val PREF_LAST_CHECK_TIME_PREFIX = "last_check_time_" |
| | | private const val KEY_INVITE = "user_invite" |
| | | |
| | | private lateinit var preferences: SharedPreferences |
| | | |
| | |
| | | fun setLastCheckTime(categoryId: Int, time: Long) { |
| | | preferences.edit().putLong(PREF_LAST_CHECK_TIME_PREFIX + categoryId, time).apply() |
| | | } |
| | | |
| | | fun getInviteCode(): String { |
| | | return preferences.getString(KEY_INVITE, "") ?: "" |
| | | } |
| | | |
| | | fun setInviteCode(invite: String) { |
| | | preferences.edit().putString(KEY_INVITE, invite).apply() |
| | | } |
| | | } |