mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 07:35:13 +00:00
chore: Follow up custom applock
This commit is contained in:
parent
9a808abdc6
commit
48a278b0ea
1 changed files with 5 additions and 4 deletions
|
@ -36,10 +36,11 @@ class AppLock extends State<AppLockWidget> with WidgetsBindingObserver {
|
|||
|
||||
@override
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||
if (isActive && state == AppLifecycleState.hidden && !_isLocked) {
|
||||
setState(() {
|
||||
_isLocked = true;
|
||||
});
|
||||
if (isActive &&
|
||||
state == AppLifecycleState.hidden &&
|
||||
!_isLocked &&
|
||||
isActive) {
|
||||
showLockScreen();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue