aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/manage_accounts
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2023-01-24 18:59:46 +0100
committerMarvin W <git@larma.de>2023-03-05 16:47:46 +0100
commitdb3b0d5f233ee3587ae54f8f035222cb098b11dd (patch)
tree587e5b21a92c8482b25338556d3ef98c764c8ebb /main/src/ui/manage_accounts
parentd81829652057d63b9971b9217996438ee41788ca (diff)
downloaddino-db3b0d5f233ee3587ae54f8f035222cb098b11dd.tar.gz
dino-db3b0d5f233ee3587ae54f8f035222cb098b11dd.zip
New Avatar UI
Diffstat (limited to 'main/src/ui/manage_accounts')
-rw-r--r--main/src/ui/manage_accounts/account_row.vala4
-rw-r--r--main/src/ui/manage_accounts/dialog.vala6
2 files changed, 5 insertions, 5 deletions
diff --git a/main/src/ui/manage_accounts/account_row.vala b/main/src/ui/manage_accounts/account_row.vala
index b3a33eae..ae734b83 100644
--- a/main/src/ui/manage_accounts/account_row.vala
+++ b/main/src/ui/manage_accounts/account_row.vala
@@ -7,7 +7,7 @@ namespace Dino.Ui.ManageAccounts {
[GtkTemplate (ui = "/im/dino/Dino/manage_accounts/account_row.ui")]
public class AccountRow : Gtk.ListBoxRow {
- [GtkChild] public unowned AvatarImage image;
+ [GtkChild] public unowned AvatarPicture picture;
[GtkChild] public unowned Label jid_label;
[GtkChild] public unowned Image icon;
@@ -17,7 +17,7 @@ public class AccountRow : Gtk.ListBoxRow {
public AccountRow(StreamInteractor stream_interactor, Account account) {
this.stream_interactor = stream_interactor;
this.account = account;
- image.set_conversation(stream_interactor, new Conversation(account.bare_jid, account, Conversation.Type.CHAT));
+ picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).add_participant(new Conversation(account.bare_jid, account, Conversation.Type.CHAT), account.bare_jid);
jid_label.set_label(account.bare_jid.to_string());
stream_interactor.connection_manager.connection_error.connect((account, error) => {
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala
index 0a37b052..a326aeff 100644
--- a/main/src/ui/manage_accounts/dialog.vala
+++ b/main/src/ui/manage_accounts/dialog.vala
@@ -19,7 +19,7 @@ public class Dialog : Gtk.Dialog {
[GtkChild] public unowned Button no_accounts_add;
[GtkChild] public unowned Button add_account_button;
[GtkChild] public unowned Button remove_account_button;
- [GtkChild] public unowned AvatarImage image;
+ [GtkChild] public unowned AvatarPicture picture;
[GtkChild] public unowned Button image_button;
[GtkChild] public unowned Label jid_label;
[GtkChild] public unowned Label state_label;
@@ -178,14 +178,14 @@ public class Dialog : Gtk.Dialog {
private void on_received_avatar(Jid jid, Account account) {
if (selected_account.equals(account) && jid.equals(account.bare_jid)) {
- image.set_conversation(stream_interactor, new Conversation(account.bare_jid, account, Conversation.Type.CHAT));
+ picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).add_participant(new Conversation(account.bare_jid, account, Conversation.Type.CHAT), account.bare_jid);
}
}
private void populate_grid_data(Account account) {
active_switch.state_set.disconnect(change_account_state);
- image.set_conversation(stream_interactor, new Conversation(account.bare_jid, account, Conversation.Type.CHAT));
+ picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).add_participant(new Conversation(account.bare_jid, account, Conversation.Type.CHAT), account.bare_jid);
active_switch.set_active(account.enabled);
jid_label.label = account.bare_jid.to_string();