mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
* Update social actions everytime you open the contextual menu of a track.
This commit is contained in:
parent
b2fc0935a4
commit
47a403a9c8
@ -277,10 +277,16 @@ void
|
||||
AudioControls::onSocialActionsLoaded()
|
||||
{
|
||||
Query* query = qobject_cast< Query* >( sender() );
|
||||
if ( !query || query != m_currentTrack->toQuery().data() )
|
||||
if ( !query )
|
||||
return;
|
||||
|
||||
setSocialActions();
|
||||
query_ptr currentQuery = m_currentTrack->toQuery();
|
||||
if ( query->artist() == currentQuery->artist() &&
|
||||
query->track() == currentQuery->track() &&
|
||||
query->album() == currentQuery->album() )
|
||||
{
|
||||
setSocialActions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,6 +88,7 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
|
||||
m_sigmap->setMapping( m_loveAction, ActionLove );
|
||||
|
||||
connect( queries.first().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) );
|
||||
m_queries.first()->loadSocialActions();
|
||||
onSocialActionsLoaded();
|
||||
}
|
||||
|
||||
|
@ -489,7 +489,7 @@ Query::loadSocialActions()
|
||||
query_ptr q = m_ownRef.toStrongRef();
|
||||
|
||||
DatabaseCommand_LoadSocialActions* cmd = new DatabaseCommand_LoadSocialActions( q );
|
||||
connect( cmd, SIGNAL( finished() ), SLOT( onSocialActionsLoaded() ));
|
||||
connect( cmd, SIGNAL( finished() ), SLOT( onSocialActionsLoaded() ) );
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user