mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Merge pull request #6190 from Bnyro/master
fix: crash when destroying activity after media session
This commit is contained in:
commit
2f1dea38c9
@ -346,7 +346,7 @@ class NowPlayingNotification(
|
|||||||
* Destroy the [NowPlayingNotification]
|
* Destroy the [NowPlayingNotification]
|
||||||
*/
|
*/
|
||||||
fun destroySelf() {
|
fun destroySelf() {
|
||||||
mediaSession.release()
|
if (this::mediaSession.isInitialized) mediaSession.release()
|
||||||
|
|
||||||
nManager.cancel(NotificationId.PLAYER_PLAYBACK.id)
|
nManager.cancel(NotificationId.PLAYER_PLAYBACK.id)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user