fix: Flutter Hive on Linux

This commit is contained in:
Christian Pauly 2021-06-29 07:59:37 +02:00
parent 6bbd6eb0c0
commit 1c1a4fa4f3
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
*.swp *.swp
*.snap *.snap
.DS_Store .DS_Store
.local/
.atom/ .atom/
.buildlog/ .buildlog/
.history .history

View File

@ -24,7 +24,11 @@ class FlutterFamedlySdkHiveDatabase extends FamedlySdkHiveDatabase {
Client client) async { Client client) async {
if (!kIsWeb && !_hiveInitialized) { if (!kIsWeb && !_hiveInitialized) {
Logs().i('Init Hive database...'); Logs().i('Init Hive database...');
await Hive.initFlutter(); if (!kIsWeb && Platform.isLinux) {
Hive.init('.local/share/fluffychat/');
} else {
await Hive.initFlutter();
}
_hiveInitialized = true; _hiveInitialized = true;
} }
HiveCipher hiverCipher; HiveCipher hiverCipher;