File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
app/src/main/kotlin/com/darkrockstudios/app/securecamera/preferences Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import kotlinx.coroutines.flow.map
1717import kotlinx.serialization.Serializable
1818import kotlinx.serialization.json.Json
1919import timber.log.Timber
20+ import kotlin.time.Duration.Companion.minutes
2021
2122private val Context .dataStore: DataStore <Preferences > by preferencesDataStore(name = " app_preferences" )
2223
@@ -37,10 +38,10 @@ class AppPreferencesManager(
3738 private val LAST_FAILED_ATTEMPT_TIMESTAMP = stringPreferencesKey(" last_failed_attempt_timestamp" )
3839 private val SESSION_TIMEOUT = stringPreferencesKey(" session_timeout" )
3940
40- const val SESSION_TIMEOUT_1_MIN = 60000L // 1 minute
41- const val SESSION_TIMEOUT_5_MIN = 300000L // 5 minutes
42- const val SESSION_TIMEOUT_10_MIN = 600000L // 10 minutes
43- const val SESSION_TIMEOUT_DEFAULT = SESSION_TIMEOUT_5_MIN
41+ val SESSION_TIMEOUT_1_MIN = 1 .minutes.inWholeMilliseconds
42+ val SESSION_TIMEOUT_5_MIN = 5 . minutes.inWholeMilliseconds
43+ val SESSION_TIMEOUT_10_MIN = 10 . minutes.inWholeMilliseconds
44+ val SESSION_TIMEOUT_DEFAULT = SESSION_TIMEOUT_5_MIN
4445 }
4546
4647 private val hasher: Hasher = CryptographyProvider .Default .get(SHA512 ).hasher()
You can’t perform that action at this time.
0 commit comments