mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-16 02:54:33 +02:00
* Update social actions everytime you open the contextual menu of a track.
This commit is contained in:
@@ -277,11 +277,17 @@ void
|
|||||||
AudioControls::onSocialActionsLoaded()
|
AudioControls::onSocialActionsLoaded()
|
||||||
{
|
{
|
||||||
Query* query = qobject_cast< Query* >( sender() );
|
Query* query = qobject_cast< Query* >( sender() );
|
||||||
if ( !query || query != m_currentTrack->toQuery().data() )
|
if ( !query )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
query_ptr currentQuery = m_currentTrack->toQuery();
|
||||||
|
if ( query->artist() == currentQuery->artist() &&
|
||||||
|
query->track() == currentQuery->track() &&
|
||||||
|
query->album() == currentQuery->album() )
|
||||||
|
{
|
||||||
setSocialActions();
|
setSocialActions();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -88,6 +88,7 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
|
|||||||
m_sigmap->setMapping( m_loveAction, ActionLove );
|
m_sigmap->setMapping( m_loveAction, ActionLove );
|
||||||
|
|
||||||
connect( queries.first().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) );
|
connect( queries.first().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) );
|
||||||
|
m_queries.first()->loadSocialActions();
|
||||||
onSocialActionsLoaded();
|
onSocialActionsLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user