diff --git a/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart b/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart index a2df2558d..3387fdf38 100644 --- a/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart +++ b/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart @@ -80,12 +80,12 @@ Future _constructDatabase(String clientName) async { final factory = createDatabaseFactoryFfi(ffiInit: SQfLiteEncryptionHelper.ffiInit); - // migrate from potential previous SQLite database path to current one - await _migrateLegacyLocation(path, clientName); - // required for [getDatabasesPath] databaseFactory = factory; + // migrate from potential previous SQLite database path to current one + await _migrateLegacyLocation(path, clientName); + // in case we got a cipher, we use the encryption helper // to manage SQLite encryption final helper = cipher == null