Remove playing notification when deleting currently playing episode (#5628)

This commit is contained in:
rubenh-be 2022-01-02 12:27:23 +01:00 committed by GitHub
parent c4aba03132
commit 3656ddcf36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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