aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_selector
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-10-18 16:52:29 +0200
committerMarvin W <git@larma.de>2019-10-18 16:52:29 +0200
commite330e60f83e6e46bbc3d320711709f2448b802e7 (patch)
tree9caf36bae3326e711fe113336985e80e7218b3d5 /main/src/ui/conversation_selector
parentde3af0ae24b70ccb7670fa236076c061316f03cb (diff)
downloaddino-e330e60f83e6e46bbc3d320711709f2448b802e7.tar.gz
dino-e330e60f83e6e46bbc3d320711709f2448b802e7.zip
Base avatars and names on conversation, not JID.
Fixes #598
Diffstat (limited to 'main/src/ui/conversation_selector')
-rw-r--r--main/src/ui/conversation_selector/conversation_selector_row.vala7
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/ui/conversation_selector/conversation_selector_row.vala b/main/src/ui/conversation_selector/conversation_selector_row.vala
index 3696f6da..fb4fbf1a 100644
--- a/main/src/ui/conversation_selector/conversation_selector_row.vala
+++ b/main/src/ui/conversation_selector/conversation_selector_row.vala
@@ -94,7 +94,7 @@ public class ConversationSelectorRow : ListBoxRow {
last_content_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_latest(conversation);
x_button.clicked.connect(close_conversation);
- image.set_jid(stream_interactor, conversation.counterpart, conversation.account);
+ image.set_conversation(stream_interactor, conversation);
conversation.notify["read-up-to"].connect(update_read);
update_name_label();
@@ -131,7 +131,7 @@ public class ConversationSelectorRow : ListBoxRow {
Message last_message = message_item.message;
if (conversation.type_ == Conversation.Type.GROUPCHAT) {
- nick_label.label = Util.get_message_display_name(stream_interactor, last_message, conversation.account) + ": ";
+ nick_label.label = Util.get_participant_display_name(stream_interactor, conversation, last_message.from, true) + ": ";
} else {
nick_label.label = last_message.direction == Message.DIRECTION_SENT ? _("Me") + ": " : "";
}
@@ -145,8 +145,7 @@ public class ConversationSelectorRow : ListBoxRow {
if (conversation.type_ == Conversation.Type.GROUPCHAT) {
// TODO properly display nick for oneself
- string nick = transfer.direction == Message.DIRECTION_SENT ? _("Me") : Util.get_display_name(stream_interactor, file_item.file_transfer.counterpart, conversation.account);
- nick_label.label = nick + ": ";
+ nick_label.label = Util.get_participant_display_name(stream_interactor, conversation, file_item.file_transfer.counterpart, true) + ": ";
} else {
nick_label.label = transfer.direction == Message.DIRECTION_SENT ? _("Me") + ": " : "";
}