mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-10 11:08:56 +01:00
Adjust app lock mechanism (#7924)
Now uses enum to also handle timed lock
This commit is contained in:
@@ -53,6 +53,10 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun lockAppAfter() = flowPrefs.getInt("lock_app_after", 0)
|
||||
|
||||
/**
|
||||
* For app lock. Will be set when there is a pending timed lock.
|
||||
* Otherwise this pref should be deleted.
|
||||
*/
|
||||
fun lastAppClosed() = flowPrefs.getLong("last_app_closed", 0)
|
||||
|
||||
fun secureScreen() = flowPrefs.getEnum("secure_screen_v2", Values.SecureScreenMode.INCOGNITO)
|
||||
|
||||
Reference in New Issue
Block a user