aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/occupant_menu/list.vala
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/occupant_menu/list.vala
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/occupant_menu/list.vala')
-rw-r--r--main/src/ui/occupant_menu/list.vala10
1 files changed, 5 insertions, 5 deletions
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);