mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
avatarregistry: avoid un-necessary updates
Only update the avatar when the profile changes. Change-Id: I2b12d31f7a2e379093fe8e900233ebfbd8ab8974
This commit is contained in:
parent
1a14fd27fe
commit
5921740321
4 changed files with 7 additions and 5 deletions
|
@ -66,9 +66,8 @@ AvatarRegistry::connectAccount()
|
|||
this,
|
||||
&AvatarRegistry::onProfileUpdated,
|
||||
Qt::UniqueConnection);
|
||||
|
||||
connect(lrcInstance_->getCurrentConversationModel(),
|
||||
&ConversationModel::conversationUpdated,
|
||||
&ConversationModel::profileUpdated,
|
||||
this,
|
||||
&AvatarRegistry::addOrUpdateImage,
|
||||
Qt::UniqueConnection);
|
||||
|
|
|
@ -78,7 +78,6 @@ Control {
|
|||
font.bold: true
|
||||
visible: (seq === MsgSeq.first || seq === MsgSeq.single) && !isOutgoing
|
||||
font.pixelSize: JamiTheme.usernameBlockFontSize
|
||||
font.family: JamiTheme.chatviewFontFamily
|
||||
color: JamiTheme.chatviewUsernameColor
|
||||
lineHeight: JamiTheme.usernameBlockLineHeight
|
||||
leftPadding: JamiTheme.usernameBlockPadding
|
||||
|
|
|
@ -429,6 +429,11 @@ Q_SIGNALS:
|
|||
* @param uid
|
||||
*/
|
||||
void conversationUpdated(const QString& uid) const;
|
||||
/**
|
||||
* Emitted when conversation's profile has been updated
|
||||
* @param uid
|
||||
*/
|
||||
void profileUpdated(const QString& uid) const;
|
||||
/**
|
||||
* Emitted when the conversations list is modified
|
||||
*/
|
||||
|
|
|
@ -2354,8 +2354,7 @@ ConversationModelPimpl::slotMessageReceived(const QString& accountId,
|
|||
MapStringString details = ConfigurationManager::instance()
|
||||
.conversationInfos(linked.owner.id, conversationId);
|
||||
conversation.infos = details;
|
||||
Q_EMIT linked.conversationUpdated(conversationId);
|
||||
Q_EMIT linked.dataChanged(indexOf(conversationId));
|
||||
Q_EMIT linked.profileUpdated(conversationId);
|
||||
return;
|
||||
}
|
||||
if (message["type"] == "initial") {
|
||||
|
|
Loading…
Add table
Reference in a new issue