mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-10 19:18:56 +01:00
Biometrics lock (closes #1686)
This commit is contained in:
@@ -105,6 +105,12 @@ object PreferenceKeys {
|
||||
|
||||
const val startScreen = "start_screen"
|
||||
|
||||
const val useBiometricLock = "use_biometric_lock"
|
||||
|
||||
const val lockAppAfter = "lock_app_after"
|
||||
|
||||
const val lastAppUnlock = "last_app_unlock"
|
||||
|
||||
const val downloadNew = "download_new"
|
||||
|
||||
const val downloadNewCategories = "download_new_categories"
|
||||
|
||||
@@ -52,6 +52,12 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun startScreen() = prefs.getInt(Keys.startScreen, 1)
|
||||
|
||||
fun useBiometricLock() = rxPrefs.getBoolean(Keys.useBiometricLock, false)
|
||||
|
||||
fun lockAppAfter() = rxPrefs.getInteger(Keys.lockAppAfter, 0)
|
||||
|
||||
fun lastAppUnlock() = rxPrefs.getLong(Keys.lastAppUnlock, 0)
|
||||
|
||||
fun clear() = prefs.edit().clear().apply()
|
||||
|
||||
fun themeMode() = rxPrefs.getString(Keys.themeMode, Values.THEME_MODE_SYSTEM)
|
||||
|
||||
Reference in New Issue
Block a user