feat(android): long-press menus on library tiles, and Undo

- a long press on a title opens a sheet: Play or Resume, Open, Download
  all, and Mark watched or unwatched for the whole title
- a long press on a Continue watching card offers Resume, Open, and
  Remove from Continue watching, which forgets the position as the
  desktop does
- marking a title and leaving Continue watching both say what they did
  in a snackbar with Undo, which puts every changed watch state back
- the "next up" episode is one shared function, used by the title page
  and the menu alike
This commit is contained in:
nvrl committed 2026-10-03 05:14:34 +02:00
1 parent 65ecc099b6
commit 0bc7cba428
6 files changed
+242 -22

No files matched your search

@@ -59,13 +59,13 @@ class ScreenshotTest {
@Test
fun `the library on a phone`() = capture("library-phone") {
LibraryScreen(LIBRARY, {}, { _, _ -> }, {}, {}, PaddingValues())
LibraryScreen(LIBRARY, {}, { _, _ -> }, {}, {}, { _, _ -> }, { _, _ -> }, PaddingValues())
}
@Test
@Config(qualifiers = RobolectricDeviceQualifiers.MediumTablet)
fun `the library on a tablet`() = capture("library-tablet") {
LibraryScreen(LIBRARY, {}, { _, _ -> }, {}, {}, PaddingValues())
LibraryScreen(LIBRARY, {}, { _, _ -> }, {}, {}, { _, _ -> }, { _, _ -> }, PaddingValues())
}
@Test
@@ -74,13 +74,13 @@ class ScreenshotTest {
// reads it from, so the scale is set there.
val density = LocalDensity.current
CompositionLocalProvider(LocalDensity provides Density(density.density, fontScale = 1.5f)) {
LibraryScreen(LIBRARY, {}, { _, _ -> }, {}, {}, PaddingValues())
LibraryScreen(LIBRARY, {}, { _, _ -> }, {}, {}, { _, _ -> }, { _, _ -> }, PaddingValues())
}
}
@Test
fun `an empty library`() = capture("library-empty") {
LibraryScreen(AppUiState(loading = false), {}, { _, _ -> }, {}, {}, PaddingValues())
LibraryScreen(AppUiState(loading = false), {}, { _, _ -> }, {}, {}, { _, _ -> }, { _, _ -> }, PaddingValues())
}
@Test