mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-23 22:12:34 +01:00
fix: app lock
This commit is contained in:
parent
19a76e96ab
commit
6d12168ce5
@ -25,6 +25,7 @@ class LockScreen extends StatelessWidget {
|
||||
);
|
||||
} else {
|
||||
AppLock.of(context).didUnlock();
|
||||
AppLock.of(context).disable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import 'package:fluffychat/app_config.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/utils/sentry_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app_lock/flutter_app_lock.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:flutter_screen_lock/lock_screen.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
@ -290,7 +291,12 @@ class _SettingsState extends State<Settings> {
|
||||
);
|
||||
if (newLock != null) {
|
||||
await FlutterSecureStorage()
|
||||
.write(key: SettingKeys.appLockKey, value: newLock.first);
|
||||
.write(key: SettingKeys.appLockKey, value: newLock.single);
|
||||
if (newLock.single.isEmpty) {
|
||||
AppLock.of(context).disable();
|
||||
} else {
|
||||
AppLock.of(context).enable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user