Add Home and History screens
CI / test (push) Successful in 2m37s

Home shows a now-playing panel (polled every 15s while visible), summary
stats and the latest scrobbles. History is an infinite-scrolling,
pull-to-refresh list that dedupes rows when pages shift. Adds edge-to-edge
system bars, themed nav bar and a Sign out button.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Sonnet 5.5 committed 2026-10-12 11:22:19 +01:00
1 parent 47c2cf5701
commit 01b17fd179
13 files changed
+570 -7

No files matched your search

@@ -3,6 +3,7 @@ package dev.daubney.scrobbled
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
@@ -23,11 +24,13 @@ class MainActivity : ComponentActivity() {
}
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
val history = (application as ScrobbledApplication).history
setContent {
ScrobbledTheme {
val state by connectVm.state.collectAsState()
if (state.connected) ScrobbledApp() else ConnectScreen(connectVm)
if (state.connected) ScrobbledApp(history, onSignOut = connectVm::disconnect) else ConnectScreen(connectVm)
}
}
}