summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorrubenh-be <ruben.hias@gmail.com>2022-01-02 12:27:23 +0100
committerGitHub <noreply@github.com>2022-01-02 12:27:23 +0100
commit3656ddcf3687d45753d02cab80268953f960e98a (patch)
tree809da49b87403a2ada87d207e5d794a4b742af0c /core
parentc4aba03132360ee3ecbcd581da5c530bbe2ba4c0 (diff)
downloadantennapod-3656ddcf3687d45753d02cab80268953f960e98a.zip
Remove playing notification when deleting currently playing episode (#5628)
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java
index fdaab745e..280a2f118 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java
@@ -6,6 +6,7 @@ import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.core.app.NotificationManagerCompat;
import org.greenrobot.eventbus.EventBus;
@@ -128,6 +129,9 @@ public class DBWriter {
if (media.getId() == PlaybackPreferences.getCurrentlyPlayingFeedMediaId()) {
PlaybackPreferences.writeNoMediaPlaying();
IntentUtils.sendLocalBroadcast(context, PlaybackService.ACTION_SHUTDOWN_PLAYBACK_SERVICE);
+
+ NotificationManagerCompat nm = NotificationManagerCompat.from(context);
+ nm.cancel(R.id.notification_playing);
}
// Gpodder: queue delete action for synchronization