From 7d1f58227164f146c68e10a18b18fd050f16a1de Mon Sep 17 00:00:00 2001 From: nift4 Date: Thu, 15 Feb 2024 18:46:08 +0100 Subject: [PATCH] Hotfix --- app/build.gradle.kts | 4 ++-- .../org/akanework/gramophone/logic/utils/MediaStoreUtils.kt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 2cc643ceb..6df40e844 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -37,9 +37,9 @@ android { applicationId = "org.akanework.gramophone" minSdk = 21 targetSdk = 34 - versionCode = 3 + versionCode = 4 versionName = - "1.0.2" + "." + "git rev-parse --short=6 HEAD".runCommand(workingDir = rootDir) + "1.0.3" + "." + "git rev-parse --short=6 HEAD".runCommand(workingDir = rootDir) buildConfigField( "String", "RELEASE_TYPE", diff --git a/app/src/main/kotlin/org/akanework/gramophone/logic/utils/MediaStoreUtils.kt b/app/src/main/kotlin/org/akanework/gramophone/logic/utils/MediaStoreUtils.kt index 72b6bbe36..1abecf869 100644 --- a/app/src/main/kotlin/org/akanework/gramophone/logic/utils/MediaStoreUtils.kt +++ b/app/src/main/kotlin/org/akanework/gramophone/logic/utils/MediaStoreUtils.kt @@ -325,7 +325,8 @@ object MediaStoreUtils { null, MediaStore.Audio.Media.TITLE + " COLLATE UNICODE ASC", ) - val recentlyAddedMap = PriorityQueue>(cursor?.count ?: 2, + val recentlyAddedMap = PriorityQueue>( + (cursor?.count ?: 0).coerceAtLeast(2), Comparator { a, b -> // reversed int order return@Comparator if (a.first == b.first) 0 else (if (a.first > b.first) -1 else 1)