Reload AppLock state on foreground

This commit is contained in:
Ali 2022-09-16 22:59:00 +04:00
parent 1fa66aad9f
commit f05031cc9d

View File

@ -132,6 +132,10 @@ public final class AppLockContextImpl: AppLockContext {
if !strongSelf.lastActiveValue {
strongSelf.lastActiveValue = true
strongSelf.lastActiveTimestamp = timestamp
if let data = try? Data(contentsOf: URL(fileURLWithPath: appLockStatePath(rootPath: strongSelf.rootPath))), let current = try? JSONDecoder().decode(LockState.self, from: data) {
strongSelf.currentStateValue = current
}
}
if let lastActiveTimestamp = strongSelf.lastActiveTimestamp {