From 109c35a36ed0d382664f7a57c83914137f701caf Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 9 Jul 2014 22:06:52 -0700 Subject: #375 Fix expanded persistent notification not toggling play/pause display --- src/github/daneren2005/dsub/util/Notifications.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/util/Notifications.java b/src/github/daneren2005/dsub/util/Notifications.java index 142fffcb..75c69d9e 100644 --- a/src/github/daneren2005/dsub/util/Notifications.java +++ b/src/github/daneren2005/dsub/util/Notifications.java @@ -142,10 +142,14 @@ public final class Notifications { } boolean persistent = Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false); - if(persistent && !expanded) { - rv.setImageViewResource(R.id.control_previous, playing ? R.drawable.notification_pause : R.drawable.notification_play); - rv.setImageViewResource(R.id.control_pause, R.drawable.notification_next); - rv.setImageViewResource(R.id.control_next, R.drawable.notification_close); + if(persistent) { + if(expanded) { + rv.setImageViewResource(R.id.control_pause, playing ? R.drawable.notification_pause : R.drawable.notification_play); + } else { + rv.setImageViewResource(R.id.control_previous, playing ? R.drawable.notification_pause : R.drawable.notification_play); + rv.setImageViewResource(R.id.control_pause, R.drawable.notification_next); + rv.setImageViewResource(R.id.control_next, R.drawable.notification_close); + } } // Create actions for media buttons -- cgit v1.2.3