Cancel notification after cancelling notification updater

Otherwise, the notification can stay while the service is actually stopped
This commit is contained in:
ByteHamster 2019-12-15 10:03:14 +01:00
parent c21bc58525
commit 3461bc376b
1 changed files with 4 additions and 4 deletions

View File

@ -213,10 +213,6 @@ public class DownloadService extends Service {
EventBus.getDefault().postSticky(DownloadEvent.refresh(Collections.emptyList()));
stopForeground(true);
NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
nm.cancel(NOTIFICATION_ID);
downloadCompletionThread.interrupt();
try {
downloadCompletionThread.join();
@ -231,6 +227,10 @@ public class DownloadService extends Service {
}
unregisterReceiver(cancelDownloadReceiver);
stopForeground(true);
NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
nm.cancel(NOTIFICATION_ID);
// if this was the initial gpodder sync, i.e. we just synced the feeds successfully,
// it is now time to sync the episode actions
if (GpodnetPreferences.loggedIn() &&