mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-04-29 22:27:24 +02:00
fix: FluffyBox logs
This commit is contained in:
parent
4822737047
commit
d9263e775d
@ -30,7 +30,7 @@ class FluffyBoxDatabase extends MatrixIndexedDatabase {
|
|||||||
static const int _cipherStorageKeyLength = 512;
|
static const int _cipherStorageKeyLength = 512;
|
||||||
|
|
||||||
static Future<FluffyBoxDatabase> databaseBuilder(Client client) async {
|
static Future<FluffyBoxDatabase> databaseBuilder(Client client) async {
|
||||||
Logs().d('Open Sembast...');
|
Logs().d('Open FluffyBox...');
|
||||||
try {
|
try {
|
||||||
// Workaround for secure storage is calling Platform.operatingSystem on web
|
// Workaround for secure storage is calling Platform.operatingSystem on web
|
||||||
if (kIsWeb) throw MissingPluginException();
|
if (kIsWeb) throw MissingPluginException();
|
||||||
@ -49,19 +49,17 @@ class FluffyBoxDatabase extends MatrixIndexedDatabase {
|
|||||||
// workaround for if we just wrote to the key and it still doesn't exist
|
// workaround for if we just wrote to the key and it still doesn't exist
|
||||||
final rawEncryptionKey = await secureStorage.read(key: _cipherStorageKey);
|
final rawEncryptionKey = await secureStorage.read(key: _cipherStorageKey);
|
||||||
if (rawEncryptionKey == null) throw MissingPluginException();
|
if (rawEncryptionKey == null) throw MissingPluginException();
|
||||||
|
|
||||||
//codec = getEncryptSembastCodec(password: rawEncryptionKey);
|
|
||||||
} on MissingPluginException catch (_) {
|
} on MissingPluginException catch (_) {
|
||||||
Logs().i('Sembast encryption is not supported on this platform');
|
Logs().i('FluffyBox encryption is not supported on this platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
final db = FluffyBoxDatabase(
|
final db = FluffyBoxDatabase(
|
||||||
client.clientName,
|
'FluffyBox-${client.clientName}',
|
||||||
path: await _findDatabasePath(client),
|
path: await _findDatabasePath(client),
|
||||||
dbFactory: factory,
|
dbFactory: factory,
|
||||||
);
|
);
|
||||||
await db.open();
|
await db.open();
|
||||||
Logs().d('Sembast is ready');
|
Logs().d('FluffyBox is ready');
|
||||||
return db;
|
return db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user