mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
* add full image provider and refactor thumb providers * photo_view updates * wip: asset-viewer * fix controller dispose on page change * wip: bottom sheet * fix interactions * more bottomsheet changes * generate schema * PR feedback * refactor asset viewer * never rotate and fix background on page change * use photoview as the loading builder * precache after delay * claude: optimizing rebuild of image provider * claude: optimizing image decoding and caching * use proper cache for new full size image providers * chore: load local HEIC fullsize for iOS * make controller callbacks nullable * remove imageprovider cache * do not handle drag gestures when zoomed * use loadOriginal setting for HEIC / larger images * preload assets outside timer * never use same controllers in photo-view gallery * fix: cannot scroll down once swipe with bottom sheet --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
44 lines
1.1 KiB
Dart
44 lines
1.1 KiB
Dart
import 'package:immich_mobile/domain/models/exif.model.dart';
|
|
import 'package:immich_mobile/infrastructure/entities/exif.entity.dart'
|
|
as entity;
|
|
import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';
|
|
import 'package:isar/isar.dart';
|
|
|
|
class IsarExifRepository extends IsarDatabaseRepository {
|
|
final Isar _db;
|
|
|
|
const IsarExifRepository(this._db) : super(_db);
|
|
|
|
Future<void> delete(int assetId) async {
|
|
await transaction(() async {
|
|
await _db.exifInfos.delete(assetId);
|
|
});
|
|
}
|
|
|
|
Future<void> deleteAll() async {
|
|
await transaction(() async {
|
|
await _db.exifInfos.clear();
|
|
});
|
|
}
|
|
|
|
Future<ExifInfo?> get(int assetId) async {
|
|
return (await _db.exifInfos.get(assetId))?.toDto();
|
|
}
|
|
|
|
Future<ExifInfo> update(ExifInfo exifInfo) {
|
|
return transaction(() async {
|
|
await _db.exifInfos.put(entity.ExifInfo.fromDto(exifInfo));
|
|
return exifInfo;
|
|
});
|
|
}
|
|
|
|
Future<List<ExifInfo>> updateAll(List<ExifInfo> exifInfos) {
|
|
return transaction(() async {
|
|
await _db.exifInfos.putAll(
|
|
exifInfos.map(entity.ExifInfo.fromDto).toList(),
|
|
);
|
|
return exifInfos;
|
|
});
|
|
}
|
|
}
|