diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-06-24 17:53:00 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-06-24 17:53:00 -0700 |
commit | bd8b2cf5de825c6b4b629b58f677b61654e71ede (patch) | |
tree | 7199b81f28ea25d614c13deddb083951eb96ea8c /src/github | |
parent | d6a11c8450b36abdf02a9e4176e271ece0e6671a (diff) | |
download | dsub-bd8b2cf5de825c6b4b629b58f677b61654e71ede.tar.gz dsub-bd8b2cf5de825c6b4b629b58f677b61654e71ede.tar.bz2 dsub-bd8b2cf5de825c6b4b629b58f677b61654e71ede.zip |
No point in posting twice for same event
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/util/Notifications.java | 14 |
1 files changed, 8 insertions, 6 deletions
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);
|