clear the compile warnings the downloads work left behind

- ArtworkStore's fetcher still did `response.body ?: throw` from before the body
  size limit landed; OkHttp's `body` is not nullable, so the elvis was dead.
- DownloadRepository's `downloadStates` uses `flatMapLatest` without the opt-in
  its callers annotate.
- HeroHeader's subtitle tap invoked `onSubtitleClick?.invoke()` inside the branch
  where it is already known to be non-null.
- MediaItemTest used a safe call on `clippingConfiguration`, which never returns
  null.

No behaviour change: a clean full rebuild now compiles without warnings.
This commit is contained in:
austinried
2026-10-04 00:30:01 +00:00
parent 6a311638c2
commit d710a3185c
4 changed files with 6 additions and 4 deletions
@@ -36,14 +36,14 @@ class MediaItemTest {
fun aDownloadedFileIsNotClippedEvenForATranscodingQuality() {
val item = queueMediaItem(song, local = "file:///downloads/1/s1", stream = "http://server/stream?s=s1", transcode = true)
assertEquals(C.TIME_END_OF_SOURCE, item.clippingConfiguration?.endPositionMs)
assertEquals(C.TIME_END_OF_SOURCE, item.clippingConfiguration.endPositionMs)
}
@Test
fun aTranscodedStreamIsClippedToItsDeclaredDuration() {
val item = queueMediaItem(song, local = null, stream = "http://server/stream?s=s1", transcode = true)
assertEquals(100_000L, item.clippingConfiguration?.endPositionMs)
assertEquals(100_000L, item.clippingConfiguration.endPositionMs)
}
@Test