mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 16:57:00 +01:00
feat(android): a downloads page of rows under each show
Saved episodes are list rows with their still, the episode's name rather than its file, and its size, under a heading per show; the page opens with how much is on the device. Downloads still arriving come first, with pause or resume and cancel as icons beside the progress. Deleting a saved episode now asks first, since getting it back is a download.
This commit is contained in:
1 parent
677ab2d928
commit
6c2ec83cb1
6 files changed
+213
-100
No files matched your search
@@ -24,6 +24,7 @@ import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
import uniffi.pstr_android.EpisodeRecord
|
||||
import uniffi.pstr_android.OfflineRecord
|
||||
import uniffi.pstr_android.SeasonRecord
|
||||
import uniffi.pstr_android.ShareRecord
|
||||
import uniffi.pstr_android.StorageUsageRecord
|
||||
@@ -125,6 +126,16 @@ class ScreenshotTest {
|
||||
HistoryScreen(LIBRARY, { _, _ -> }, {}, { _, _ -> }, PaddingValues(), ZoneOffset.UTC, LocalDate.of(2026, 9, 21))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `the downloads page with a season saved`() = capture("downloads-phone") {
|
||||
val saved = SERIES.seasons.first().episodes.take(2).map {
|
||||
OfflineRecord(it.shareId, it.linkId, "revision", 1_300_000_000uL, it)
|
||||
}
|
||||
// One title: the fixtures reuse link ids across titles, so with the
|
||||
// whole library the episodes would be filed under whichever came last.
|
||||
DownloadsScreen(LIBRARY.copy(titles = listOf(SERIES), offline = saved), {}, {}, {}, {}, PaddingValues())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `the downloads page with nothing offline`() = capture("downloads-empty") {
|
||||
DownloadsScreen(LIBRARY, {}, {}, {}, {}, PaddingValues())
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
Reference in new issue
Block a user