From 1e54a442ba78cd117c0262b9b5e83ef4438e5858 Mon Sep 17 00:00:00 2001 From: codedust Date: Mon, 20 Aug 2018 02:59:58 +0200 Subject: Display room name in conversation selector and conversation titlebar --- main/src/ui/conversation_selector/conversation_row.vala | 2 +- main/src/ui/conversation_selector/groupchat_row.vala | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'main/src/ui/conversation_selector') diff --git a/main/src/ui/conversation_selector/conversation_row.vala b/main/src/ui/conversation_selector/conversation_row.vala index d79b840b..ea0aeeb4 100644 --- a/main/src/ui/conversation_selector/conversation_row.vala +++ b/main/src/ui/conversation_selector/conversation_row.vala @@ -61,7 +61,7 @@ public abstract class ConversationRow : ListBoxRow { update_read(); } - protected void update_name_label(string? new_name = null) { + protected void update_name_label() { name_label.label = Util.get_conversation_display_name(stream_interactor, conversation); } diff --git a/main/src/ui/conversation_selector/groupchat_row.vala b/main/src/ui/conversation_selector/groupchat_row.vala index fdbfa40b..70b24dfd 100644 --- a/main/src/ui/conversation_selector/groupchat_row.vala +++ b/main/src/ui/conversation_selector/groupchat_row.vala @@ -12,6 +12,12 @@ public class GroupchatRow : ConversationRow { closed.connect(() => { stream_interactor.get_module(MucManager.IDENTITY).part(conversation.account, conversation.counterpart); }); + + stream_interactor.get_module(MucManager.IDENTITY).room_name_set.connect((account, jid, room_name) => { + if (conversation != null && conversation.counterpart.equals_bare(jid) && conversation.account.equals(account)) { + update_name_label(); + } + }); } protected override void update_message_label() { -- cgit v1.2.3-70-g09d2