From db3b0d5f233ee3587ae54f8f035222cb098b11dd Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 24 Jan 2023 18:59:46 +0100 Subject: New Avatar UI --- main/src/ui/add_conversation/conference_list.vala | 2 +- main/src/ui/add_conversation/list_row.vala | 6 +++--- main/src/ui/add_conversation/select_jid_fragment.vala | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'main/src/ui/add_conversation') diff --git a/main/src/ui/add_conversation/conference_list.vala b/main/src/ui/add_conversation/conference_list.vala index 14beaf92..0b630ae4 100644 --- a/main/src/ui/add_conversation/conference_list.vala +++ b/main/src/ui/add_conversation/conference_list.vala @@ -112,7 +112,7 @@ internal class ConferenceListRow : ListRow { via_label.visible = false; } - image.set_conversation(stream_interactor, new Conversation(jid, account, Conversation.Type.GROUPCHAT)); + picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).set_conversation(new Conversation(jid, account, Conversation.Type.GROUPCHAT)); } } diff --git a/main/src/ui/add_conversation/list_row.vala b/main/src/ui/add_conversation/list_row.vala index 5b3ec49a..c5e344d0 100644 --- a/main/src/ui/add_conversation/list_row.vala +++ b/main/src/ui/add_conversation/list_row.vala @@ -9,7 +9,7 @@ namespace Dino.Ui { public class ListRow : Widget { public Grid outer_grid; - public AvatarImage image; + public AvatarPicture picture; public Label name_label; public Label via_label; @@ -19,7 +19,7 @@ public class ListRow : Widget { construct { Builder builder = new Builder.from_resource("/im/dino/Dino/add_conversation/list_row.ui"); outer_grid = (Grid) builder.get_object("outer_grid"); - image = (AvatarImage) builder.get_object("image"); + picture = (AvatarPicture) builder.get_object("picture"); name_label = (Label) builder.get_object("name_label"); via_label = (Label) builder.get_object("via_label"); @@ -45,7 +45,7 @@ public class ListRow : Widget { via_label.visible = false; } name_label.label = display_name; - image.set_conversation(stream_interactor, conv); + picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).set_conversation(conv); } public override void dispose() { diff --git a/main/src/ui/add_conversation/select_jid_fragment.vala b/main/src/ui/add_conversation/select_jid_fragment.vala index 25b0b11f..e0682e29 100644 --- a/main/src/ui/add_conversation/select_jid_fragment.vala +++ b/main/src/ui/add_conversation/select_jid_fragment.vala @@ -132,7 +132,7 @@ public class SelectJidFragment : Gtk.Box { } else { via_label.visible = false; } - image.set_text("?"); + picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).add("+"); } } } -- cgit v1.2.3-70-g09d2