diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-06-14 20:36:37 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-06-14 20:36:37 +0200 |
commit | bb80d3feebdc9acc52e3f4ad24084d8425f043a2 (patch) | |
tree | 2084a84c39f159c6aea254775dc0880d52579d45 /src/Thumbnail.vala | |
parent | b26ff0798252a1a8072dd2c7a67f6205de9fde11 (diff) | |
parent | 31804433d72460cbe0a39f9f8ea5e76058d84cda (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/Thumbnail.vala')
-rw-r--r-- | src/Thumbnail.vala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Thumbnail.vala b/src/Thumbnail.vala index f47fc69..51d2612 100644 --- a/src/Thumbnail.vala +++ b/src/Thumbnail.vala @@ -169,14 +169,15 @@ public class Thumbnail : MediaSourceItem { } public static int64 exposure_time_ascending_comparator(void *a, void *b) { - int64 time_a = (int64) (((Thumbnail *) a)->media.get_exposure_time()); - int64 time_b = (int64) (((Thumbnail *) b)->media.get_exposure_time()); - int64 result = (time_a - time_b); + var time_a = (((Thumbnail *) a)->media.get_exposure_time()); + var time_b = (((Thumbnail *) b)->media.get_exposure_time()); + + var result = nullsafe_date_time_comperator(time_a, time_b); return (result != 0) ? result : filename_ascending_comparator(a, b); } - public static int64 exposure_time_desending_comparator(void *a, void *b) { + public static int64 exposure_time_descending_comparator(void *a, void *b) { int64 result = exposure_time_ascending_comparator(b, a); return (result != 0) ? result : filename_descending_comparator(a, b); |