diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/SongRow.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/SongRow.kt index a0321ad..a9984c6 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/SongRow.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/SongRow.kt @@ -82,16 +82,6 @@ fun SongRow( modifier = Modifier.height(14.dp).align(Alignment.BottomStart), contentDescription = difficulty, ) - playlogDxStarImage(dxStar)?.let { star -> - BundledIcon( - image = star, - modifier = Modifier - .padding(top = 2.dp, end = 3.dp) - .height(16.dp) - .align(Alignment.TopEnd), - contentDescription = "DX star $dxStar", - ) - } } Column( @@ -145,6 +135,9 @@ fun SongRow( if (syncBadge != null) { BundledIcon(image = syncBadge, modifier = Modifier.height(14.dp), contentDescription = syncStatus) } + musicDxStarImage(dxStar)?.let { star -> + BundledIcon(image = star, modifier = Modifier.height(14.dp), contentDescription = "DX star $dxStar") + } if (placing.isNotBlank()) { val placingImg = when (placing) { "1st" -> BundledImage.Playlog1st diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/images/MaimaiImages.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/images/MaimaiImages.kt index 8224197..359bcaa 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/images/MaimaiImages.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/images/MaimaiImages.kt @@ -242,6 +242,11 @@ val UiIconPreloadImages: List = listOf( BundledImage.MusicIconSP, BundledImage.MusicIconSSP, BundledImage.MusicIconSSSP, + BundledImage.DxStar1, + BundledImage.DxStar2, + BundledImage.DxStar3, + BundledImage.DxStar4, + BundledImage.DxStar5, BundledImage.FCBadge, BundledImage.FCPBadge, BundledImage.FSBadge, @@ -330,6 +335,15 @@ fun playlogDxStarImage(star: Int): BundledImage? = when (star) { else -> null } +fun musicDxStarImage(star: Int): BundledImage? = when (star) { + 1 -> BundledImage.DxStar1 + 2 -> BundledImage.DxStar2 + 3 -> BundledImage.DxStar3 + 4 -> BundledImage.DxStar4 + 5 -> BundledImage.DxStar5 + else -> null +} + /** * Maps FC status to bundled badge image. */ diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayDetailTab.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayDetailTab.kt index f1ac7b8..b009786 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayDetailTab.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/tabs/PlayDetailTab.kt @@ -93,13 +93,6 @@ fun PlayDetailTab(client: MaimaiClient, cookie: String, idx: String, onMusicDeta contentDescription = d.name, contentScale = ContentScale.Crop, ) - playlogDxStarImage(d.dxStar)?.let { star -> - BundledIcon( - image = star, - modifier = Modifier.height(18.dp).align(Alignment.TopEnd), - contentDescription = "DX star ${d.dxStar}", - ) - } } } Column(modifier = Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(3.dp)) { @@ -115,6 +108,7 @@ fun PlayDetailTab(client: MaimaiClient, cookie: String, idx: String, onMusicDeta listOfNotNull( fcBadgeImage(d.fcStatus), syncBadgeImage(d.syncStatus), + musicDxStarImage(d.dxStar), d.matchingRank?.let { placingImage(it) }, ).forEach { badge -> BundledIcon(image = badge, modifier = Modifier.height(18.dp), contentDescription = null)