Delay resume playback on startup to make sure Tidal login is refreshed

This commit is contained in:
Jonas Kvinge
2021-07-14 13:02:54 +02:00
parent facf49b2b7
commit fab1d94d34
2 changed files with 12 additions and 3 deletions

View File

@@ -1431,7 +1431,9 @@ void MainWindow::LoadPlaybackStatus() {
s.endGroup();
if (resume_playback && playback_state != Engine::Empty && playback_state != Engine::Idle) {
QObject::connect(app_->playlist_manager(), &PlaylistManager::AllPlaylistsLoaded, this, &MainWindow::ResumePlayback);
QObject::connect(app_->playlist_manager(), &PlaylistManager::AllPlaylistsLoaded, this, [this]() {
QTimer::singleShot(400, this, &MainWindow::ResumePlayback);
});
}
}