mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Try fixing chart loading race condition
This commit is contained in:
parent
4de60911cd
commit
b040870cf1
@ -238,7 +238,8 @@ WhatsHotWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestDat
|
||||
|
||||
m_artistModels[ chartId ] = artistsModel;
|
||||
|
||||
setLeftViewArtists( artistsModel );
|
||||
if ( m_queueItemToShow == chartId )
|
||||
setLeftViewArtists( artistsModel );
|
||||
}
|
||||
else if( type == "albums" )
|
||||
{
|
||||
@ -259,7 +260,9 @@ WhatsHotWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestDat
|
||||
albumModel->addAlbums( al );
|
||||
|
||||
m_albumModels[ chartId ] = albumModel;
|
||||
setLeftViewAlbums( albumModel );
|
||||
|
||||
if ( m_queueItemToShow == chartId )
|
||||
setLeftViewAlbums( albumModel );
|
||||
}
|
||||
else if( type == "tracks" )
|
||||
{
|
||||
@ -278,7 +281,9 @@ WhatsHotWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestDat
|
||||
trackModel->append( tracklist );
|
||||
|
||||
m_trackModels[ chartId ] = trackModel;
|
||||
setLeftViewTracks( trackModel );
|
||||
|
||||
if ( m_queueItemToShow == chartId )
|
||||
setLeftViewTracks( trackModel );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -360,6 +365,7 @@ WhatsHotWidget::leftCrumbIndexChanged( QModelIndex index )
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData, 20000, true );
|
||||
|
||||
m_queuedFetches.insert( chartId );
|
||||
m_queueItemToShow = chartId;
|
||||
}
|
||||
|
||||
|
||||
|
@ -96,6 +96,7 @@ private:
|
||||
QHash< QString, AlbumModel* > m_albumModels;
|
||||
QHash< QString, TreeModel* > m_artistModels;
|
||||
QHash< QString, PlaylistModel* > m_trackModels;
|
||||
QString m_queueItemToShow;
|
||||
QSet< QString > m_queuedFetches;
|
||||
QTimer* m_timer;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user