Skip to content

Commit

Permalink
Fix preview issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Isira-Seneviratne committed Jan 21, 2025
1 parent aeb4548 commit 3943a87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import org.schabi.newpipe.ui.components.items.Stream

internal class StreamItemPreviewProvider : PreviewParameterProvider<Stream> {
override val values = sequenceOf(
Stream(type = StreamType.NONE, uploaderName = "Uploader"),
Stream(type = StreamType.LIVE_STREAM),
Stream(type = StreamType.AUDIO_LIVE_STREAM),
Stream(type = StreamType.NONE, name = "Stream", uploaderName = "Uploader"),
Stream(type = StreamType.LIVE_STREAM, name = "Stream", uploaderName = "Uploader"),
Stream(type = StreamType.AUDIO_LIVE_STREAM, name = "Stream", uploaderName = "Uploader"),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ fun StreamMenu(
) {
val info = stream.toStreamInfoItem()
val context = LocalContext.current
val streamViewModel = viewModel<StreamViewModel>()
val playerHolder = PlayerHolder.getInstance()

DropdownMenu(expanded = expanded, onDismissRequest = onDismissRequest) {
val streamViewModel = viewModel<StreamViewModel>()

if (playerHolder.isPlayQueueReady) {
StreamMenuItem(
text = R.string.enqueue_stream,
Expand Down

0 comments on commit 3943a87

Please sign in to comment.