mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 15:47:38 +02:00
* Fixed TWK-387: Stop showing a loading spinner, if there are no items to load.
This commit is contained in:
@@ -74,8 +74,7 @@ DatabaseCommand_AllAlbums::execForArtist( DatabaseImpl* dbi )
|
|||||||
al << album;
|
al << album;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( al.count() )
|
emit albums( al, data() );
|
||||||
emit albums( al, data() );
|
|
||||||
emit done();
|
emit done();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,8 +123,7 @@ DatabaseCommand_AllAlbums::execForCollection( DatabaseImpl* dbi )
|
|||||||
al << album;
|
al << album;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( al.count() )
|
emit albums( al, data() );
|
||||||
emit albums( al, data() );
|
|
||||||
emit done();
|
emit done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -526,6 +526,8 @@ void
|
|||||||
TreeModel::onAlbumsAdded( const QList<Tomahawk::album_ptr>& albums, const QVariant& data )
|
TreeModel::onAlbumsAdded( const QList<Tomahawk::album_ptr>& albums, const QVariant& data )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << albums.count() << data.toInt();
|
qDebug() << Q_FUNC_INFO << albums.count() << data.toInt();
|
||||||
|
|
||||||
|
emit loadingFinished();
|
||||||
if ( !albums.count() )
|
if ( !albums.count() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -568,8 +570,6 @@ TreeModel::onAlbumsAdded( const QList<Tomahawk::album_ptr>& albums, const QVaria
|
|||||||
emit endInsertRows();
|
emit endInsertRows();
|
||||||
else
|
else
|
||||||
emit dataChanged( albumitem->index, albumitem->index.sibling( albumitem->index.row(), columnCount( QModelIndex() ) - 1 ) );
|
emit dataChanged( albumitem->index, albumitem->index.sibling( albumitem->index.row(), columnCount( QModelIndex() ) - 1 ) );
|
||||||
|
|
||||||
emit loadingFinished();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -577,6 +577,8 @@ void
|
|||||||
TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QVariant& data )
|
TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QVariant& data )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << tracks.count();
|
qDebug() << Q_FUNC_INFO << tracks.count();
|
||||||
|
|
||||||
|
emit loadingFinished();
|
||||||
if ( !tracks.count() )
|
if ( !tracks.count() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -610,8 +612,6 @@ TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QVaria
|
|||||||
emit endInsertRows();
|
emit endInsertRows();
|
||||||
|
|
||||||
emit dataChanged( item->index.sibling( 0, 0 ), item->index.sibling( item->index.row(), columnCount( QModelIndex() ) - 1 ) );
|
emit dataChanged( item->index.sibling( 0, 0 ), item->index.sibling( item->index.row(), columnCount( QModelIndex() ) - 1 ) );
|
||||||
|
|
||||||
emit loadingFinished();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user