Fix logic of app unlock (#7569)

This commit is contained in:
AntsyLich
2022-07-22 08:23:59 +06:00
committed by GitHub
parent 3547d0142f
commit 8ea05e852e
4 changed files with 4 additions and 4 deletions

View File

@@ -68,6 +68,6 @@ class SecureActivityDelegateImpl : SecureActivityDelegate, DefaultLifecycleObser
private fun isAppLocked(): Boolean {
if (!SecureActivityDelegate.locked) return false
return preferences.lockAppAfter().get() <= 0 ||
Date().time >= preferences.lastAppUnlock().get() + 60 * 1000 * preferences.lockAppAfter().get()
Date().time >= preferences.lastAppClosed().get() + 60 * 1000 * preferences.lockAppAfter().get()
}
}

View File

@@ -10,7 +10,6 @@ import eu.kanade.tachiyomi.util.system.AuthenticatorUtil
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.startAuthentication
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
import java.util.Date
/**
* Blank activity with a BiometricPrompt.
@@ -39,7 +38,6 @@ class UnlockActivity : BaseActivity() {
) {
super.onAuthenticationSucceeded(activity, result)
SecureActivityDelegate.locked = false
preferences.lastAppUnlock().set(Date().time)
finish()
}
},