mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05: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
1 changed files with 2 additions and 1 deletions
|
@ -524,7 +524,8 @@ bool isRotated270CW(int orientation) {
|
||||||
|
|
||||||
/// Returns `true` if this [Asset] is flipped 90° or 270° clockwise
|
/// Returns `true` if this [Asset] is flipped 90° or 270° clockwise
|
||||||
bool isFlipped(AssetResponseDto response) {
|
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 &&
|
return orientation != 0 &&
|
||||||
(isRotated90CW(orientation) || isRotated270CW(orientation));
|
(isRotated90CW(orientation) || isRotated270CW(orientation));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue