Skip to content

Commit

Permalink
Fix not resetting play icon
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxarn committed Jun 6, 2020
1 parent 447466a commit d459715
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ void MainWindow::refreshed(const spt::Playback &playback)
auto currPlaying = QString("%1\n%2").arg(current.item.name).arg(current.item.artist);
if (nowPlaying->text() != currPlaying)
{
if (current.isPlaying && trackItems.contains(current.item.id))
setPlayingTrackItem(trackItems[current.item.id]);
if (current.isPlaying)
setPlayingTrackItem(trackItems.contains(current.item.id)
? trackItems[current.item.id] : nullptr);
nowPlaying->setText(currPlaying);
setAlbumImage(current.item.image);
setWindowTitle(QString("%1 - %2").arg(current.item.artist).arg(current.item.name));
Expand Down

0 comments on commit d459715

Please sign in to comment.