From 3275cf51799bec5e2bcbdcc584dad522065ce295 Mon Sep 17 00:00:00 2001 From: darthpaul Date: Thu, 6 Oct 2022 23:31:20 +0100 Subject: [PATCH] sort resolutions by aspect ratio --- .../com/simplemobiletools/camera/helpers/ImageQualityManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/ImageQualityManager.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/ImageQualityManager.kt index 9177c781..3792d261 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/ImageQualityManager.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/ImageQualityManager.kt @@ -64,6 +64,7 @@ class ImageQualityManager( .flatMap { it.qualities } .sortedByDescending { it.pixels } .distinctBy { it.getAspectRatio(activity) } + .sortedByDescending { it.getAspectRatio(activity).split(":").firstOrNull()?.toIntOrNull() } .filter { it.isSupported(fullScreenSize.isSixteenToNine()) } }