[UI/MOBILE] The playqueue button is no longer a toggle button
This commit is contained in:
@@ -182,16 +182,7 @@ AudioPlayer::AudioPlayer(ControlFlags controls, Wt::WContainerWidget *parent)
|
||||
playQueueBtn->addStyleClass("mediaplayer-btn");
|
||||
playQueueBtn->clicked().connect(std::bind([=] ()
|
||||
{
|
||||
if (playQueueBtn->hasStyleClass("mediaplayer-btn-active"))
|
||||
{
|
||||
playQueueBtn->removeStyleClass("mediaplayer-btn-active");
|
||||
_playQueue.emit(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
playQueueBtn->addStyleClass("mediaplayer-btn-active");
|
||||
_playQueue.emit(true);
|
||||
}
|
||||
_playQueue.emit();
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class AudioPlayer : public Wt::WTemplate
|
||||
Wt::Signal<void>& playPrevious() {return _playPrevious;}
|
||||
Wt::Signal<bool>& shuffle() {return _shuffle;}
|
||||
Wt::Signal<bool>& loop() {return _loop;}
|
||||
Wt::Signal<bool>& showPlayQueue() {return _playQueue;}
|
||||
Wt::Signal<void>& showPlayQueue() {return _playQueue;}
|
||||
|
||||
private:
|
||||
|
||||
@@ -61,7 +61,7 @@ class AudioPlayer : public Wt::WTemplate
|
||||
Wt::Signal<void> _playPrevious;
|
||||
Wt::Signal<bool> _shuffle;
|
||||
Wt::Signal<bool> _loop;
|
||||
Wt::Signal<bool> _playQueue;
|
||||
Wt::Signal<void> _playQueue;
|
||||
|
||||
Wt::WAudio* _audio;
|
||||
Wt::WText* _trackCurTime;
|
||||
|
||||
@@ -112,11 +112,10 @@ Audio::Audio(Wt::WContainerWidget *parent)
|
||||
AudioPlayer* audioPlayer = new AudioPlayer(AudioPlayer::ControlPlayqueue);
|
||||
footer->bindWidget("player", audioPlayer);
|
||||
|
||||
audioPlayer->showPlayQueue().connect(std::bind([=] (bool state)
|
||||
audioPlayer->showPlayQueue().connect(std::bind([=]
|
||||
{
|
||||
if (state)
|
||||
wApp->setInternalPath("/audio/playqueue", true);
|
||||
}, std::placeholders::_1));
|
||||
wApp->setInternalPath("/audio/playqueue", true);
|
||||
}));
|
||||
|
||||
// Connect the audio player events to the playqueue
|
||||
playQueue->playTrack().connect(std::bind([=] (Database::Track::id_type id)
|
||||
|
||||
Reference in New Issue
Block a user