mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-10 01:10:33 +00:00
Dismiss popup menu on clicking an option
This commit is contained in:
parent
06a5828bbe
commit
8e8f627097
@ -34,6 +34,7 @@ fun StreamMenu(
|
|||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(text = stringResource(R.string.download)) },
|
text = { Text(text = stringResource(R.string.download)) },
|
||||||
onClick = {
|
onClick = {
|
||||||
|
onDismissRequest()
|
||||||
SparseItemUtil.fetchStreamInfoAndSaveToDatabase(
|
SparseItemUtil.fetchStreamInfoAndSaveToDatabase(
|
||||||
context, stream.serviceId, stream.url
|
context, stream.serviceId, stream.url
|
||||||
) { info: StreamInfo ->
|
) { info: StreamInfo ->
|
||||||
@ -49,11 +50,17 @@ fun StreamMenu(
|
|||||||
)
|
)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(text = stringResource(R.string.share)) },
|
text = { Text(text = stringResource(R.string.share)) },
|
||||||
onClick = { ShareUtils.shareText(context, stream.name, stream.url, stream.thumbnails) }
|
onClick = {
|
||||||
|
onDismissRequest()
|
||||||
|
ShareUtils.shareText(context, stream.name, stream.url, stream.thumbnails)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(text = stringResource(R.string.open_in_browser)) },
|
text = { Text(text = stringResource(R.string.open_in_browser)) },
|
||||||
onClick = { ShareUtils.openUrlInBrowser(context, stream.url) }
|
onClick = {
|
||||||
|
onDismissRequest()
|
||||||
|
ShareUtils.openUrlInBrowser(context, stream.url)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(text = stringResource(R.string.mark_as_watched)) },
|
text = { Text(text = stringResource(R.string.mark_as_watched)) },
|
||||||
|
Loading…
Reference in New Issue
Block a user