diff options
author | fiaxh <git@mx.ax.lt> | 2017-11-11 21:29:13 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-11-16 17:43:00 +0100 |
commit | 3f531d6b91edab6c79fa232143db828bad13853c (patch) | |
tree | 1083046c94e0b4a43cf16ac4a388fcea8ef91e84 /main/src/ui/manage_accounts | |
parent | 1d0745177e7a116455811dfd26e07b848cb89b75 (diff) | |
download | dino-3f531d6b91edab6c79fa232143db828bad13853c.tar.gz dino-3f531d6b91edab6c79fa232143db828bad13853c.zip |
Read+(write) stream async
Diffstat (limited to 'main/src/ui/manage_accounts')
-rw-r--r-- | main/src/ui/manage_accounts/account_row.vala | 14 | ||||
-rw-r--r-- | main/src/ui/manage_accounts/dialog.vala | 21 |
2 files changed, 13 insertions, 22 deletions
diff --git a/main/src/ui/manage_accounts/account_row.vala b/main/src/ui/manage_accounts/account_row.vala index 911d48f4..8ac2c213 100644 --- a/main/src/ui/manage_accounts/account_row.vala +++ b/main/src/ui/manage_accounts/account_row.vala @@ -21,16 +21,14 @@ public class AccountRow : Gtk.ListBoxRow { jid_label.set_label(account.bare_jid.to_string()); stream_interactor.connection_manager.connection_error.connect((account, error) => { - Idle.add(() => { - if (account.equals(this.account)) update_warning_icon(); - return false; - }); + if (account.equals(this.account)) { + update_warning_icon(); + } }); stream_interactor.connection_manager.connection_state_changed.connect((account, state) => { - Idle.add(() => { - if (account.equals(this.account)) update_warning_icon(); - return false; - }); + if (account.equals(this.account)) { + update_warning_icon(); + } }); } diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala index 6fdce712..f82e90c0 100644 --- a/main/src/ui/manage_accounts/dialog.vala +++ b/main/src/ui/manage_accounts/dialog.vala @@ -84,23 +84,16 @@ public class Dialog : Gtk.Dialog { add_account(account); } - stream_interactor.get_module(AvatarManager.IDENTITY).received_avatar.connect((pixbuf, jid, account) => { - Idle.add(() => { - on_received_avatar(pixbuf, jid, account); - return false; - }); - }); + stream_interactor.get_module(AvatarManager.IDENTITY).received_avatar.connect(on_received_avatar); stream_interactor.connection_manager.connection_error.connect((account, error) => { - Idle.add(() => { - if (account.equals(selected_account)) update_status_label(account); - return false; - }); + if (account.equals(selected_account)) { + update_status_label(account); + } }); stream_interactor.connection_manager.connection_state_changed.connect((account, state) => { - Idle.add(() => { - if (account.equals(selected_account)) update_status_label(account); - return false; - }); + if (account.equals(selected_account)) { + update_status_label(account); + } }); if (account_list.get_row_at_index(0) != null) account_list.select_row(account_list.get_row_at_index(0)); |