mirror of
https://github.com/immich-app/immich.git
synced 2024-11-24 08:52:28 +02:00
fix(mobile): not throwing error when cannot parse orientation value (#13853)
* fix(mobile): not throw when error in parsing the orientation * fix(mobile): not throw when error in parsing the orientation * linting
This commit is contained in:
parent
a28b92b3cc
commit
343cdcfeed
@ -524,7 +524,8 @@ bool isRotated270CW(int orientation) {
|
||||
|
||||
/// Returns `true` if this [Asset] is flipped 90° or 270° clockwise
|
||||
bool isFlipped(AssetResponseDto response) {
|
||||
final int orientation = response.exifInfo?.orientation?.toInt() ?? 0;
|
||||
final int orientation =
|
||||
int.tryParse(response.exifInfo?.orientation ?? '0') ?? 0;
|
||||
return orientation != 0 &&
|
||||
(isRotated90CW(orientation) || isRotated270CW(orientation));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user