Skip to content

Commit 135d560

Browse files
Remove Unknown class, update some dependencies
1 parent 695c05b commit 135d560

3 files changed

Lines changed: 10 additions & 15 deletions

File tree

app/src/main/java/org/schabi/newpipe/ui/components/items/Info.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,3 @@ class Playlist(
6262
item.streamCount
6363
)
6464
}
65-
66-
object Unknown : Info()

app/src/main/java/org/schabi/newpipe/ui/components/video/RelatedItems.kt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import org.schabi.newpipe.info_list.ItemViewMode
3535
import org.schabi.newpipe.ui.components.items.ItemList
3636
import org.schabi.newpipe.ui.components.items.Playlist
3737
import org.schabi.newpipe.ui.components.items.Stream
38-
import org.schabi.newpipe.ui.components.items.Unknown
3938
import org.schabi.newpipe.ui.theme.AppTheme
4039
import org.schabi.newpipe.util.Localization
4140
import org.schabi.newpipe.util.NO_SERVICE_ID
@@ -50,13 +49,11 @@ fun RelatedItems(info: StreamInfo) {
5049
var isAutoQueueEnabled by rememberSaveable {
5150
mutableStateOf(sharedPreferences.getBoolean(key, false))
5251
}
53-
val displayItems = info.relatedItems.map {
54-
if (it is StreamInfoItem) {
55-
Stream(it, getStreamDetailText(context, it))
56-
} else if (it is PlaylistInfoItem) {
57-
Playlist(it)
58-
} else {
59-
Unknown
52+
val displayItems = info.relatedItems.mapNotNull {
53+
when (it) {
54+
is StreamInfoItem -> Stream(it, getStreamDetailText(context, it))
55+
is PlaylistInfoItem -> Playlist(it)
56+
else -> null
6057
}
6158
}
6259

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ auto-service = "1.1.1"
99
bridge = "2.0.2"
1010
cardview = "1.0.0"
1111
checkstyle = "10.12.1"
12-
coil = "3.0.4"
12+
coil = "3.1.0"
1313
constraintlayout = "2.1.4"
1414
core-ktx = "1.15.0"
1515
desugar-jdk-libs-nio = "2.0.4"
@@ -19,11 +19,11 @@ fragment-compose = "1.8.5"
1919
gradle = "8.7.3"
2020
groupie = "2.10.1"
2121
hilt = "2.51.1"
22-
jetpack-compose = "2025.01.00"
22+
jetpack-compose = "2025.01.01"
2323
jsoup = "1.17.2"
2424
junit = "4.13.2"
25-
kotlin = "2.1.0"
26-
kotlinxCoroutinesRx3 = "1.9.0"
25+
kotlin = "2.1.10"
26+
kotlinxCoroutinesRx3 = "1.10.1"
2727
ktlint = "0.45.2"
2828
lazycolumnscrollbar = "2.2.0"
2929
leakcanary = "2.12"
@@ -33,7 +33,7 @@ markwon = "4.6.2"
3333
material = "1.11.0"
3434
media = "1.7.0"
3535
mockitoCore = "5.6.0"
36-
navigationCompose = "2.8.5"
36+
navigationCompose = "2.8.6"
3737
okhttp = "4.12.0"
3838
pagingCompose = "3.3.5"
3939
preference = "1.2.1"

0 commit comments

Comments
 (0)