From 89c3ecdd06492a28a0fec6edde17cb2bcd38c00b Mon Sep 17 00:00:00 2001 From: vfsfitvnm Date: Fri, 29 Jul 2022 18:46:23 +0200 Subject: [PATCH] Stop the radio when the collapsed player is dismissed --- .../main/kotlin/it/vfsfitvnm/vimusic/ui/views/PlayerView.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/views/PlayerView.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/views/PlayerView.kt index 1336dc7..7240972 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/views/PlayerView.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/views/PlayerView.kt @@ -147,7 +147,10 @@ fun PlayerView( BottomSheet( state = layoutState, modifier = modifier, - onDismiss = binder.player::clearMediaItems, + onDismiss = { + binder.stopRadio() + binder.player.clearMediaItems() + }, collapsedContent = { Row( horizontalArrangement = Arrangement.spacedBy(12.dp),