refactor: (BREAKING) Remove deprecated Hive Database
This commit is contained in:
parent
cb9350fa8e
commit
135face535
|
|
@ -25,7 +25,6 @@ export 'fake_matrix_api.dart' show FakeMatrixApi;
|
|||
|
||||
export 'src/client.dart';
|
||||
export 'src/database/database_api.dart';
|
||||
export 'src/database/hive_database.dart';
|
||||
export 'src/database/matrix_sdk_database.dart';
|
||||
export 'src/database/hive_collections_database.dart';
|
||||
export 'src/database/sqflite_encryption_helper.dart';
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -38,7 +38,6 @@ String createLargeString(String character, int desiredSize) {
|
|||
void main() {
|
||||
final databaseBuilders = {
|
||||
'Matrix SDK Database': getMatrixSdkDatabase,
|
||||
'Hive Database': getHiveDatabase,
|
||||
'Hive Collections Database': getHiveCollectionsDatabase,
|
||||
};
|
||||
|
||||
|
|
@ -660,9 +659,7 @@ void main() {
|
|||
),
|
||||
);
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
if (database is! HiveCollectionsDatabase &&
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
database is! FamedlySdkHiveDatabase) {
|
||||
if (database is! HiveCollectionsDatabase) {
|
||||
final profile2 =
|
||||
await database.getUserProfile('@alice:example.com');
|
||||
expect(profile2?.displayname, 'Alice M');
|
||||
|
|
|
|||
|
|
@ -61,18 +61,3 @@ Future<MatrixSdkDatabase> getMatrixSdkDatabase(
|
|||
await db.open();
|
||||
return db;
|
||||
}
|
||||
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
Future<FamedlySdkHiveDatabase> getHiveDatabase(Client? c) async {
|
||||
if (!hiveInitialized) {
|
||||
final testHivePath = await LocalFileSystem()
|
||||
.systemTempDirectory
|
||||
.createTemp('dart-sdk-tests-database');
|
||||
Hive.init(testHivePath.path);
|
||||
hiveInitialized = true;
|
||||
}
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
final db = FamedlySdkHiveDatabase('unit_test.${c?.hashCode}');
|
||||
await db.open();
|
||||
return db;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue