2024-05-01 02:36:40 +00:00
|
|
|
import 'package:immich_mobile/entities/album.entity.dart';
|
|
|
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
|
|
|
import 'package:immich_mobile/entities/etag.entity.dart';
|
|
|
|
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
|
|
|
import 'package:immich_mobile/entities/store.entity.dart';
|
|
|
|
import 'package:immich_mobile/entities/user.entity.dart';
|
2023-03-27 02:35:52 +00:00
|
|
|
import 'package:isar/isar.dart';
|
|
|
|
|
|
|
|
Future<void> clearAssetsAndAlbums(Isar db) async {
|
|
|
|
await Store.delete(StoreKey.assetETag);
|
|
|
|
await db.writeTxn(() async {
|
|
|
|
await db.assets.clear();
|
|
|
|
await db.exifInfos.clear();
|
|
|
|
await db.albums.clear();
|
2023-05-25 03:52:43 +00:00
|
|
|
await db.eTags.clear();
|
|
|
|
await db.users.clear();
|
2023-03-27 02:35:52 +00:00
|
|
|
});
|
|
|
|
}
|