More logic for enabling ban and love buttons when the user logs in to Last.fm
This commit is contained in:
parent
daaec56b4b
commit
d63001af02
|
@ -253,7 +253,7 @@ void MainWindow::MediaPlaying() {
|
|||
ui_.action_play_pause->setEnabled(
|
||||
! (playlist_->current_item_options() & PlaylistItem::PauseDisabled));
|
||||
|
||||
bool is_lastfm = playlist_->current_item_options() & PlaylistItem::LastFMControls;
|
||||
bool is_lastfm = (playlist_->current_item_options() & PlaylistItem::LastFMControls);
|
||||
LastFMService* lastfm = radio_model_->GetLastFMService();
|
||||
|
||||
ui_.action_ban->setEnabled(lastfm->IsScrobblingEnabled() && is_lastfm);
|
||||
|
@ -264,7 +264,11 @@ void MainWindow::MediaPlaying() {
|
|||
}
|
||||
|
||||
void MainWindow::ScrobblingEnabledChanged(bool value) {
|
||||
ui_.action_ban->setEnabled(value);
|
||||
if (!player_->GetState() == Engine::Idle)
|
||||
return;
|
||||
|
||||
bool is_lastfm = (playlist_->current_item_options() & PlaylistItem::LastFMControls);
|
||||
ui_.action_ban->setEnabled(value && is_lastfm);
|
||||
ui_.action_love->setEnabled(value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue