fix: Seahorse does not properly work on many Linux devices
- stop use of `flutter_secure_storage` for Linux in favor of unencrypted storage Unlike many other platforms, many Linux distributions have built-in support for FDE or home directory encryption. As long as `flutter_secure_storage` makes FluffyChat useles on many Linuxes, this seems to be the only solution until they stop using Seahorse. Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
parent
531f43d42a
commit
d5a0d68a33
8 changed files with 25 additions and 11 deletions
|
|
@ -4,6 +4,7 @@ import 'package:flutter_app_lock/flutter_app_lock.dart';
|
|||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:pin_code_text_field/pin_code_text_field.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
|
|
@ -71,8 +72,12 @@ class _LockScreenState extends State<LockScreen> {
|
|||
hasError: _wrongInput,
|
||||
onDone: (String input) async {
|
||||
if (input ==
|
||||
await const FlutterSecureStorage()
|
||||
.read(key: SettingKeys.appLockKey)) {
|
||||
await ([TargetPlatform.linux]
|
||||
.contains(Theme.of(context).platform)
|
||||
? SharedPreferences.getInstance().then((prefs) =>
|
||||
prefs.getString(SettingKeys.appLockKey))
|
||||
: const FlutterSecureStorage()
|
||||
.read(key: SettingKeys.appLockKey))) {
|
||||
AppLock.of(context).didUnlock();
|
||||
} else {
|
||||
_textEditingController.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue