diff --git a/android/app/src/main/java/com/fabledsword/minstrel/admin/ui/AdminRequestsScreen.kt b/android/app/src/main/java/com/fabledsword/minstrel/admin/ui/AdminRequestsScreen.kt index 39fa8942..4156564a 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/admin/ui/AdminRequestsScreen.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/admin/ui/AdminRequestsScreen.kt @@ -102,7 +102,7 @@ private fun RequestList( AdminRequestRow( req = req, requester = usernames[req.userId] - ?: req.userId.takeIf { it.isNotEmpty() }?.take(8) + ?: req.userId.takeIf { it.isNotEmpty() }?.take(USER_ID_PREFIX_LEN) ?: "unknown", onApprove = { onApprove(req.id) }, onReject = { onReject(req.id) }, @@ -176,3 +176,7 @@ private fun LoadingCentered() { CircularProgressIndicator(color = MaterialTheme.colorScheme.primary) } } + +// UUID prefix length used as a friendlier-than-raw-UUID fallback when +// the admin users list fetch fails and we can't resolve userId → name. +private const val USER_ID_PREFIX_LEN = 8 diff --git a/android/app/src/main/java/com/fabledsword/minstrel/library/data/LibraryRepository.kt b/android/app/src/main/java/com/fabledsword/minstrel/library/data/LibraryRepository.kt index 0164e1d2..f25d779c 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/library/data/LibraryRepository.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/library/data/LibraryRepository.kt @@ -27,6 +27,11 @@ import javax.inject.Singleton * NetworkModule, we don't @Provides per-endpoint Retrofit interfaces * — fewer Hilt bindings, locality of reference. */ +// LibraryRepository owns reads + refreshes for three entity families +// (artists / albums / tracks) plus shuffle. Function count scales with +// entity-family count; splitting into per-family repos would +// scatter the shared dao + retrofit plumbing for no real gain. +@Suppress("TooManyFunctions") @Singleton class LibraryRepository @Inject constructor( private val artistDao: CachedArtistDao, diff --git a/android/gradle.properties b/android/gradle.properties index 6657f33c..d0549dd1 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,10 @@ -org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8 +# --enable-native-access=ALL-UNNAMED silences the JDK 22+ "restricted +# method in java.lang.System has been called" warning that Gradle 9.1's +# bundled native-platform-0.22-milestone-28.jar trips via System.load(). +# Future JDKs will require this opt-in to allow native loads from +# unnamed modules; the jar itself doesn't yet declare native access in +# its manifest, so we opt in at the daemon level. +org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8 --enable-native-access=ALL-UNNAMED org.gradle.parallel=true org.gradle.caching=true org.gradle.configuration-cache=true