feat(m15): local Zune Card on social screen

This commit is contained in:
John Smith
2026-09-11 01:40:29 -04:00
parent aa80bc458e
commit 27833a78c1
3 changed files with 36 additions and 4 deletions
@@ -34,6 +34,8 @@ import androidx.compose.foundation.text.BasicTextField
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import com.heretek.dorado_hd.data.model.Rating
import kotlinx.coroutines.flow.first
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateListOf
@@ -632,10 +634,40 @@ private val FROZEN_FEED = listOf(
MockPost("mix master mika", "shuffled by album all morning — life-changing.", "november 2012"),
)
private data class ZuneCard(val tracks: Int, val hearts: Int, val plays: Int)
@Composable
fun SocialScreen(canvasWidth: androidx.compose.ui.unit.Dp) {
val graph = LocalDoradoGraph.current
val colors = LocalDoradoColors.current
var card by remember { mutableStateOf<ZuneCard?>(null) }
LaunchedEffect(Unit) {
val tracks = graph.library.tracks().first()
val ratings = graph.quickplay.ratings()
val plays = graph.playCounts.counts()
card = ZuneCard(
tracks = tracks.size,
hearts = ratings.count { it.value == Rating.HEART.value },
plays = plays.values.sum(),
)
}
DetailScaffold(title = "social") {
Column(Modifier.fillMaxSize()) {
// Zune Card — the device's GemUserCardScene, as a local substitute
// for the dead Zune Social servers.
card?.let { c ->
Column(
Modifier
.fillMaxWidth()
.padding(horizontal = DoradoTokens.EDGE.dp, vertical = 8.dp),
) {
EdgeCropText(text = "zune card", fontSize = DoradoTokens.TYPE_NOW_META.dp, color = colors.accent)
EdgeCropText(
text = "${c.tracks} tracks · ${c.hearts} hearts · ${c.plays} plays",
fontSize = DoradoTokens.TYPE_LIST.dp,
)
}
}
EdgeCropText(
text = "the social feed is frozen in time.",
fontSize = DoradoTokens.TYPE_NOW_META.dp,
+1 -1
View File
@@ -243,7 +243,7 @@ explicitly documented (long-term / N-A) — no gap unplanned.
- ✅ **D1** Share (`ACTION_SEND`) from Now Playing.
- ✅ **D3** Marketplace discovery: catalog search + entry details over the frozen catalog.
- ⏳ **D2** Inbox + social user card (needs a social/inbox backend; mock shells only today).
- 🟡 **D2** Social user card: a local **Zune Card** (tracks/hearts/plays) on the Social screen; the inbox still needs a backend (mock shell only).
- ⏳ **D4** Audiobooks (new media model — the largest remaining gap).
### Long-term backlog (documented, not scheduled)
+3 -3
View File
@@ -145,11 +145,11 @@
"axis": "device",
"priority": 12,
"effort": "M",
"status": "missing",
"status": "partial",
"device_evidence": "gemstone.exe GemInboxListContentScene/GemInboxDetailsScene/GemUserCardScene",
"hd_state": "mock shells only (ui/apps/mocks/Mocks.kt:90)",
"milestone": "long-term",
"resolution": "Needs a social/inbox backend; mock shells only. Long-term."
"milestone": "M15",
"resolution": "Local Zune Card (tracks/hearts/plays) shipped (M15); inbox still needs a backend (mock shell only)."
},
{
"id": "pinlock-wifi",