aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_content_view
diff options
context:
space:
mode:
authorsojuz151 <36378873+sojuz151@users.noreply.github.com>2021-08-24 19:35:00 +0200
committerGitHub <noreply@github.com>2021-08-24 19:35:00 +0200
commit93e2e0d1cf7d6e5a7ccc7f6960d06d93e7e0eb87 (patch)
tree0d9a2cb0eb59a5ab3aa54aa7a730dddb288031bc /main/src/ui/conversation_content_view
parent863d66b16eb60c4b28b52af52d944bfd1dc1b21a (diff)
downloaddino-93e2e0d1cf7d6e5a7ccc7f6960d06d93e7e0eb87.tar.gz
dino-93e2e0d1cf7d6e5a7ccc7f6960d06d93e7e0eb87.zip
Fixed name change (#1076)
Diffstat (limited to 'main/src/ui/conversation_content_view')
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala13
1 files changed, 11 insertions, 2 deletions
diff --git a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
index 343c6631..d6bf5089 100644
--- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
@@ -127,6 +127,7 @@ public class ItemMetaDataHeader : Box {
public Entities.Message.Marked item_mark { get; set; }
private ArrayList<Plugins.MetaConversationItem> items = new ArrayList<Plugins.MetaConversationItem>();
private uint time_update_timeout = 0;
+ private ulong updated_roster_handler_id = 0;
public ItemMetaDataHeader(StreamInteractor stream_interactor, Conversation conversation, Plugins.MetaConversationItem item) {
this.stream_interactor = stream_interactor;
@@ -136,6 +137,11 @@ public class ItemMetaDataHeader : Box {
update_name_label();
name_label.style_updated.connect(update_name_label);
+ updated_roster_handler_id = stream_interactor.get_module(RosterManager.IDENTITY).updated_roster_item.connect((account, jid, roster_item) => {
+ if (this.conversation.account.equals(account) && this.conversation.counterpart.equals(jid)) {
+ update_name_label();
+ }
+ });
conversation.notify["encryption"].connect(update_unencrypted_icon);
item.notify["encryption"].connect(update_encryption_icon);
@@ -309,12 +315,15 @@ public class ItemMetaDataHeader : Box {
}
public override void dispose() {
- base.dispose();
-
if (time_update_timeout != 0) {
Source.remove(time_update_timeout);
time_update_timeout = 0;
}
+ if (updated_roster_handler_id != 0){
+ stream_interactor.get_module(RosterManager.IDENTITY).disconnect(updated_roster_handler_id);
+ updated_roster_handler_id = 0;
+ }
+ base.dispose();
}
}