Add queue lock/unlock snackbar message
This commit is contained in:
parent
44f6ebbda1
commit
a2104964e7
|
@ -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();
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue