From e330e60f83e6e46bbc3d320711709f2448b802e7 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Fri, 18 Oct 2019 16:52:29 +0200 Subject: Base avatars and names on conversation, not JID. Fixes #598 --- main/src/ui/occupant_menu/list.vala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main/src/ui/occupant_menu/list.vala') diff --git a/main/src/ui/occupant_menu/list.vala b/main/src/ui/occupant_menu/list.vala index f31ada93..4abc3636 100644 --- a/main/src/ui/occupant_menu/list.vala +++ b/main/src/ui/occupant_menu/list.vala @@ -57,7 +57,7 @@ public class List : Box { } public void add_occupant(Jid jid) { - rows[jid] = new ListRow(stream_interactor, conversation.account, jid); + rows[jid] = new ListRow(stream_interactor, conversation, jid); list_box.add(rows[jid]); } @@ -83,12 +83,12 @@ public class List : Box { private void header(ListBoxRow row, ListBoxRow? before_row) { ListRow c1 = row as ListRow; - Xmpp.Xep.Muc.Affiliation? a1 = stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c1.jid, c1.account); + Xmpp.Xep.Muc.Affiliation? a1 = stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c1.jid, c1.conversation.account); if (a1 == null) return; if (before_row != null) { ListRow c2 = (ListRow) before_row; - Xmpp.Xep.Muc.Affiliation? a2 = stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c2.jid, c2.account); + Xmpp.Xep.Muc.Affiliation? a2 = stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c2.jid, c2.conversation.account); if (a1 != a2) { row.set_header(generate_header_widget(a1, false)); } else if (row.get_header() != null){ @@ -145,8 +145,8 @@ public class List : Box { if (row1.get_type().is_a(typeof(ListRow)) && row2.get_type().is_a(typeof(ListRow))) { ListRow c1 = row1 as ListRow; ListRow c2 = row2 as ListRow; - int affiliation1 = get_affiliation_ranking(stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c1.jid, c1.account) ?? Xmpp.Xep.Muc.Affiliation.NONE); - int affiliation2 = get_affiliation_ranking(stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c2.jid, c2.account) ?? Xmpp.Xep.Muc.Affiliation.NONE); + int affiliation1 = get_affiliation_ranking(stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c1.jid, c1.conversation.account) ?? Xmpp.Xep.Muc.Affiliation.NONE); + int affiliation2 = get_affiliation_ranking(stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c2.jid, c2.conversation.account) ?? Xmpp.Xep.Muc.Affiliation.NONE); if (affiliation1 < affiliation2) return -1; else if (affiliation1 > affiliation2) return 1; else return c1.name_label.label.collate(c2.name_label.label); -- cgit v1.2.3-54-g00ecf