mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Reload AppLock state on foreground
This commit is contained in:
parent
1fa66aad9f
commit
f05031cc9d
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user