diff options
author | recalculated <recalculated@users.noreply.github.com> | 2016-01-07 20:35:04 -0600 |
---|---|---|
committer | recalculated <recalculated@users.noreply.github.com> | 2016-01-07 20:35:04 -0600 |
commit | a2104964e7576930e85afb289b620aa0c770544a (patch) | |
tree | a6351b0f950dd4bb8b6a863760c1846fdabfb1e3 | |
parent | 44f6ebbda1f883cd0b4029e2c680c215a6344d09 (diff) | |
download | AntennaPod-a2104964e7576930e85afb289b620aa0c770544a.zip |
Add queue lock/unlock snackbar message
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java | 13 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index 1271887b1..f14e4f46e 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -267,10 +267,17 @@ public class QueueFragment extends Fragment { if (!super.onOptionsItemSelected(item)) { switch (item.getItemId()) { case R.id.queue_lock: - boolean locked = !UserPreferences.isQueueLocked(); - UserPreferences.setQueueLocked(locked); + boolean newLockState = !UserPreferences.isQueueLocked(); + UserPreferences.setQueueLocked(newLockState); getActivity().supportInvalidateOptionsMenu(); - recyclerAdapter.setLocked(locked); + recyclerAdapter.setLocked(newLockState); + if (newLockState) { + Snackbar.make(getActivity().findViewById(R.id.content), R.string + .queue_locked, Snackbar.LENGTH_SHORT).show(); + } else { + Snackbar.make(getActivity().findViewById(R.id.content), R.string + .queue_unlocked, Snackbar.LENGTH_SHORT).show(); + } return true; case R.id.refresh_item: List<Feed> feeds = ((MainActivity) getActivity()).getFeeds(); diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 443a1a8a8..69acdcc4a 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -217,6 +217,8 @@ <!-- Queue operations --> <string name="lock_queue">Lock Queue</string> <string name="unlock_queue">Unlock Queue</string> + <string name="queue_locked">Queue locked</string> + <string name="queue_unlocked">Queue unlocked</string> <string name="clear_queue_label">Clear Queue</string> <string name="undo">Undo</string> <string name="removed_from_queue">Item removed</string> |