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)