Merge branch 'linux-seahorse-fix' into 'main'

fix: Seahorse does not properly work on many Linux devices

See merge request famedly/fluffychat!680
This commit is contained in:
Krille Fear 2022-01-22 10:23:44 +00:00
commit c7e80074ed
6 changed files with 20 additions and 6 deletions

View file

@ -40,6 +40,8 @@ class FlutterFluffyBoxDatabase extends FluffyBoxDatabase {
final containsEncryptionKey =
await secureStorage.containsKey(key: _cipherStorageKey);
if (!containsEncryptionKey) {
// do not try to create a buggy secure storage for new Linux users
if (Platform.isLinux) throw MissingPluginException();
final key = Hive.generateSecureKey();
await secureStorage.write(
key: _cipherStorageKey,

View file

@ -31,7 +31,7 @@ class FlutterMatrixHiveStore extends FamedlySdkHiveDatabase {
HiveCipher hiverCipher;
try {
// Workaround for secure storage is calling Platform.operatingSystem on web
if (kIsWeb) throw MissingPluginException();
if (kIsWeb || Platform.isLinux) throw MissingPluginException();
const secureStorage = FlutterSecureStorage();
final containsEncryptionKey =