aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-08-07 13:42:19 -0700
committerScott Jackson <daneren2005@gmail.com>2014-08-07 13:42:19 -0700
commita31e11c8a08033f7a15947d21d494f32323f202a (patch)
tree0b726fe27f0fa264a6a7273cad3ab365f5996bb2 /src
parentc504e891fa944256fa6957beea127c7cb11b8766 (diff)
downloaddsub-a31e11c8a08033f7a15947d21d494f32323f202a.tar.gz
dsub-a31e11c8a08033f7a15947d21d494f32323f202a.tar.bz2
dsub-a31e11c8a08033f7a15947d21d494f32323f202a.zip
#383 Add intents to go to sync notification's action
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/Notifications.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/util/Notifications.java b/src/github/daneren2005/dsub/util/Notifications.java
index a070b37a..67eb4626 100644
--- a/src/github/daneren2005/dsub/util/Notifications.java
+++ b/src/github/daneren2005/dsub/util/Notifications.java
@@ -311,6 +311,29 @@ public final class Notifications {
Intent notificationIntent = new Intent(context, SubsonicFragmentActivity.class);
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+
+ String tab, type;
+ switch(stringId) {
+ case R.string.sync_new_albums:
+ type = "newest";
+ break;
+ case R.string.sync_new_playlists:
+ tab = "Playlist";
+ break;
+ case R.string.sync_new_podcasts:
+ tab = "Podcast";
+ break;
+ case R.string.sync_new_starred:
+ type = "starred";
+ break;
+ }
+ if(tab != null) {
+ notificationIntent.putExtra(Constants.INTENT_EXTRA_FRAGMENT_TYPE, tab);
+ }
+ if(type != null) {
+ notificationIntent.putExtra(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_TYPE, type);
+ }
+
builder.setContentIntent(PendingIntent.getActivity(context, 2, notificationIntent, 0));
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);