mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
* Don't try to re-load avatars.
This commit is contained in:
parent
344130cf60
commit
1ec3a3bb70
@ -321,6 +321,7 @@ PeerInfo::avatar( TomahawkUtils::ImageMode style, const QSize& size ) const
|
||||
{
|
||||
if ( !m_avatar )
|
||||
{
|
||||
tDebug() << "Avatar for:" << id();
|
||||
Q_ASSERT( !contactId().isEmpty() );
|
||||
if ( m_avatarBuffer.isEmpty() && !contactId().isEmpty() )
|
||||
m_avatarBuffer = TomahawkUtils::Cache::instance()->getData( "Sources", contactId() ).toByteArray();
|
||||
@ -329,12 +330,6 @@ PeerInfo::avatar( TomahawkUtils::ImageMode style, const QSize& size ) const
|
||||
if ( !m_avatarBuffer.isEmpty() )
|
||||
m_avatar->loadFromData( m_avatarBuffer );
|
||||
|
||||
if ( m_avatar->isNull() )
|
||||
{
|
||||
delete m_avatar;
|
||||
m_avatar = 0;
|
||||
}
|
||||
|
||||
m_avatarBuffer.clear();
|
||||
}
|
||||
|
||||
@ -346,7 +341,7 @@ PeerInfo::avatar( TomahawkUtils::ImageMode style, const QSize& size ) const
|
||||
{
|
||||
pixmap = *m_fancyAvatar;
|
||||
}
|
||||
else if ( m_avatar )
|
||||
else if ( m_avatar && !m_avatar->isNull() )
|
||||
{
|
||||
pixmap = *m_avatar;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user