From 49a3deab39d0cd567be7a8f208a7ddefd8eadcb8 Mon Sep 17 00:00:00 2001 From: tait smith Date: Tue, 6 Feb 2024 14:42:40 -0800 Subject: [PATCH 1/3] prevent notification from being dismissed while playback is active --- .../mobile/player/interaction/PlayerNotificationHelper.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt b/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt index b2e686714..0ba547870 100644 --- a/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt +++ b/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt @@ -114,6 +114,10 @@ class PlayerNotificationHelper(private val viewModel: PlayerViewModel) : KoinCom } setContentIntent(buildContentIntent()) setDeleteIntent(buildDeleteIntent()) + + //prevents the notification from being dismissed while playback is ongoing + //which causes video to stop. see #1284 + setOngoing(player.isPlaying) }.build() nm.notify(VIDEO_PLAYER_NOTIFICATION_ID, notification) From 5ff8f772fc9d38f0d417b916f04b9c641c364af5 Mon Sep 17 00:00:00 2001 From: tait smith Date: Sat, 9 Mar 2024 10:01:32 -0800 Subject: [PATCH 2/3] edit comment --- .../mobile/player/interaction/PlayerNotificationHelper.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt b/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt index 0ba547870..6d2bce6fa 100644 --- a/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt +++ b/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt @@ -116,7 +116,6 @@ class PlayerNotificationHelper(private val viewModel: PlayerViewModel) : KoinCom setDeleteIntent(buildDeleteIntent()) //prevents the notification from being dismissed while playback is ongoing - //which causes video to stop. see #1284 setOngoing(player.isPlaying) }.build() From ae009558031b408c0d052b236c7a142758fd2f6a Mon Sep 17 00:00:00 2001 From: tait smith Date: Tue, 12 Mar 2024 14:54:00 -0700 Subject: [PATCH 3/3] fix detekt error --- .../mobile/player/interaction/PlayerNotificationHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt b/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt index 6d2bce6fa..5b8ca57db 100644 --- a/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt +++ b/app/src/main/java/org/jellyfin/mobile/player/interaction/PlayerNotificationHelper.kt @@ -115,7 +115,7 @@ class PlayerNotificationHelper(private val viewModel: PlayerViewModel) : KoinCom setContentIntent(buildContentIntent()) setDeleteIntent(buildDeleteIntent()) - //prevents the notification from being dismissed while playback is ongoing + // prevents the notification from being dismissed while playback is ongoing setOngoing(player.isPlaying) }.build()