You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
feat(mobile): edit location action (#19645)
* change dto from integer to double * feat(mobile): edit location action * patch openapi * refactor in provider * fix lint * chore: not showing success prompt if dimissed * i18n --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:drift/drift.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/entities/exif.entity.drift.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
|
||||
@@ -41,3 +43,36 @@ class IsarExifRepository extends IsarDatabaseRepository {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class DriftRemoteExifRepository extends DriftDatabaseRepository {
|
||||
final Drift _db;
|
||||
const DriftRemoteExifRepository(this._db) : super(_db);
|
||||
|
||||
Future<ExifInfo?> get(String assetId) {
|
||||
final query = _db.remoteExifEntity.select()
|
||||
..where((exif) => exif.assetId.equals(assetId));
|
||||
|
||||
return query.map((asset) => asset.toDto()).getSingleOrNull();
|
||||
}
|
||||
}
|
||||
|
||||
extension on RemoteExifEntityData {
|
||||
ExifInfo toDto() {
|
||||
return ExifInfo(
|
||||
fileSize: fileSize,
|
||||
description: description,
|
||||
orientation: orientation,
|
||||
timeZone: timeZone,
|
||||
dateTimeOriginal: dateTimeOriginal,
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
city: city,
|
||||
state: state,
|
||||
country: country,
|
||||
make: make,
|
||||
model: model,
|
||||
f: fNumber,
|
||||
iso: iso,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user