Skip to content

Commit 7d61741

Browse files
committed
Fix opening channel fragment from anywhere
1 parent effbe7a commit 7d61741

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

app/src/main/java/org/schabi/newpipe/ui/components/menu/LongPressAction.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import androidx.compose.material.icons.filled.Share
2525
import androidx.compose.ui.graphics.vector.ImageVector
2626
import androidx.core.net.toUri
2727
import kotlinx.coroutines.Dispatchers
28-
import kotlinx.coroutines.reactive.awaitFirst
2928
import kotlinx.coroutines.rx3.await
3029
import kotlinx.coroutines.rx3.awaitSingle
3130
import kotlinx.coroutines.withContext
@@ -214,8 +213,8 @@ data class LongPressAction(
214213
item.url,
215214
item.uploaderUrl
216215
)
217-
NavigationHelper.openChannelFragment(
218-
context.findFragmentActivity().supportFragmentManager,
216+
NavigationHelper.openChannelFragmentUsingIntent(
217+
context,
219218
item.serviceId,
220219
uploaderUrl,
221220
item.uploaderName
@@ -372,8 +371,8 @@ data class LongPressAction(
372371
buildShareActionList(item) +
373372
listOfNotNull(
374373
Type.ShowChannelDetails.buildAction { context ->
375-
NavigationHelper.openChannelFragment(
376-
context.findFragmentActivity().supportFragmentManager,
374+
NavigationHelper.openChannelFragmentUsingIntent(
375+
context,
377376
item.serviceId,
378377
item.url,
379378
item.name

0 commit comments

Comments
 (0)