mirror of
https://github.com/immich-app/immich.git
synced 2025-03-18 02:31:28 -05:00
fix(mobile): calculate isFlipped for exif from db (#16797)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
f0f0056fe3
commit
81df812f56
2 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import 'package:immich_mobile/domain/models/exif.model.dart' as domain;
|
||||
import 'package:immich_mobile/infrastructure/utils/exif.converter.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
|
||||
part 'exif.entity.g.dart';
|
||||
|
@ -74,6 +75,7 @@ class ExifInfo {
|
|||
orientation: orientation,
|
||||
timeZone: timeZone,
|
||||
dateTimeOriginal: dateTimeOriginal,
|
||||
isFlipped: ExifDtoConverter.isOrientationFlipped(orientation),
|
||||
latitude: lat,
|
||||
longitude: long,
|
||||
city: city,
|
||||
|
|
|
@ -9,7 +9,7 @@ abstract final class ExifDtoConverter {
|
|||
orientation: dto.orientation,
|
||||
timeZone: dto.timeZone,
|
||||
dateTimeOriginal: dto.dateTimeOriginal,
|
||||
isFlipped: _isOrientationFlipped(dto.orientation),
|
||||
isFlipped: isOrientationFlipped(dto.orientation),
|
||||
latitude: dto.latitude?.toDouble(),
|
||||
longitude: dto.longitude?.toDouble(),
|
||||
city: dto.city,
|
||||
|
@ -25,7 +25,7 @@ abstract final class ExifDtoConverter {
|
|||
);
|
||||
}
|
||||
|
||||
static bool _isOrientationFlipped(String? orientation) {
|
||||
static bool isOrientationFlipped(String? orientation) {
|
||||
final value = orientation == null ? null : int.tryParse(orientation);
|
||||
if (value == null) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue