mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user