From bd8b2cf5de825c6b4b629b58f677b61654e71ede Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 24 Jun 2014 17:53:00 -0700 Subject: No point in posting twice for same event --- src/github/daneren2005/dsub/util/Notifications.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/util/Notifications.java b/src/github/daneren2005/dsub/util/Notifications.java index 2d167715..3eec7517 100644 --- a/src/github/daneren2005/dsub/util/Notifications.java +++ b/src/github/daneren2005/dsub/util/Notifications.java @@ -85,15 +85,17 @@ public final class Notifications { public void run() { downloadService.stopForeground(true); showDownloadingNotification(context, downloadService, handler, downloadService.getCurrentDownloading(), downloadService.getBackgroundDownloads().size()); + downloadService.startForeground(NOTIFICATION_ID_PLAYING, notification); + } + }); + } else { + handler.post(new Runnable() { + @Override + public void run() { + downloadService.startForeground(NOTIFICATION_ID_PLAYING, notification); } }); } - handler.post(new Runnable() { - @Override - public void run() { - downloadService.startForeground(NOTIFICATION_ID_PLAYING, notification); - } - }); // Update widget DSubWidgetProvider.notifyInstances(context, downloadService, playing); -- cgit v1.2.3