aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-06-24 17:53:00 -0700
committerScott Jackson <daneren2005@gmail.com>2014-06-24 17:53:00 -0700
commitbd8b2cf5de825c6b4b629b58f677b61654e71ede (patch)
tree7199b81f28ea25d614c13deddb083951eb96ea8c /src
parentd6a11c8450b36abdf02a9e4176e271ece0e6671a (diff)
downloaddsub-bd8b2cf5de825c6b4b629b58f677b61654e71ede.tar.gz
dsub-bd8b2cf5de825c6b4b629b58f677b61654e71ede.tar.bz2
dsub-bd8b2cf5de825c6b4b629b58f677b61654e71ede.zip
No point in posting twice for same event
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/Notifications.java14
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);