show queue is (again) a swipe option

This commit is contained in:
Adrian Ulrich 2016-05-10 19:07:56 +02:00
parent 6d1382dc57
commit 2ae7e3123d
4 changed files with 19 additions and 8 deletions

View File

@ -51,6 +51,7 @@ THE SOFTWARE.
<item>EnqueueArtist</item>
<item>EnqueueGenre</item>
<item>ClearQueue</item>
<item>ShowQueue</item>
<item>ToggleControls</item>
<item>SeekForward</item>
<item>SeekBackward</item>
@ -70,6 +71,7 @@ THE SOFTWARE.
<item>@string/preferences_action_enqueue_current_artist</item>
<item>@string/preferences_action_enqueue_current_genre</item>
<item>@string/preferences_action_clear_queue</item>
<item>@string/preferences_action_show_queue</item>
<item>@string/toggle_controls</item>
<item>@string/seek_10s_forward</item>
<item>@string/seek_10s_backward</item>

View File

@ -80,6 +80,10 @@ enum Action {
* Clear the queue of all remaining songs.
*/
ClearQueue,
/**
* Displays the queue
*/
ShowQueue,
/**
* Toggle the controls in the playback activity.
*/

View File

@ -613,13 +613,17 @@ public class FullPlaybackActivity extends SlidingPlaybackActivity
}
@Override
protected void performAction(Action action)
{
if (action == Action.ToggleControls) {
setControlsVisible(!mControlsVisible);
mHandler.sendEmptyMessage(MSG_SAVE_CONTROLS);
} else {
super.performAction(action);
protected void performAction(Action action) {
switch (action) {
case ToggleControls:
setControlsVisible(!mControlsVisible);
mHandler.sendEmptyMessage(MSG_SAVE_CONTROLS);
break;
case ShowQueue:
mSlidingView.expandSlide();
break;
default:
super.performAction(action);
}
}

View File

@ -2264,7 +2264,8 @@ public final class PlaybackService extends Service
showMirrorLinkSafeToast(R.string.queue_cleared, Toast.LENGTH_SHORT);
break;
case ToggleControls:
// Handled in FullPlaybackActivity.performAction
case ShowQueue:
// These are NOOPs here and should be handled in FullPlaybackActivity
break;
case SeekForward:
if (mCurrentSong != null) {