Skip to content

Commit 3943a87

Browse files
Fix preview issue
1 parent aeb4548 commit 3943a87

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import org.schabi.newpipe.ui.components.items.Stream
66

77
internal class StreamItemPreviewProvider : PreviewParameterProvider<Stream> {
88
override val values = sequenceOf(
9-
Stream(type = StreamType.NONE, uploaderName = "Uploader"),
10-
Stream(type = StreamType.LIVE_STREAM),
11-
Stream(type = StreamType.AUDIO_LIVE_STREAM),
9+
Stream(type = StreamType.NONE, name = "Stream", uploaderName = "Uploader"),
10+
Stream(type = StreamType.LIVE_STREAM, name = "Stream", uploaderName = "Uploader"),
11+
Stream(type = StreamType.AUDIO_LIVE_STREAM, name = "Stream", uploaderName = "Uploader"),
1212
)
1313
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ fun StreamMenu(
3030
) {
3131
val info = stream.toStreamInfoItem()
3232
val context = LocalContext.current
33-
val streamViewModel = viewModel<StreamViewModel>()
3433
val playerHolder = PlayerHolder.getInstance()
3534

3635
DropdownMenu(expanded = expanded, onDismissRequest = onDismissRequest) {
36+
val streamViewModel = viewModel<StreamViewModel>()
37+
3738
if (playerHolder.isPlayQueueReady) {
3839
StreamMenuItem(
3940
text = R.string.enqueue_stream,

0 commit comments

Comments
 (0)