aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/add_conversation
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-11-11 21:29:13 +0100
committerfiaxh <git@mx.ax.lt>2017-11-16 17:43:00 +0100
commit3f531d6b91edab6c79fa232143db828bad13853c (patch)
tree1083046c94e0b4a43cf16ac4a388fcea8ef91e84 /main/src/ui/add_conversation
parent1d0745177e7a116455811dfd26e07b848cb89b75 (diff)
downloaddino-3f531d6b91edab6c79fa232143db828bad13853c.tar.gz
dino-3f531d6b91edab6c79fa232143db828bad13853c.zip
Read+(write) stream async
Diffstat (limited to 'main/src/ui/add_conversation')
-rw-r--r--main/src/ui/add_conversation/add_conference_dialog.vala2
-rw-r--r--main/src/ui/add_conversation/conference_details_fragment.vala7
-rw-r--r--main/src/ui/add_conversation/conference_list.vala14
-rw-r--r--main/src/ui/add_conversation/roster_list.vala4
4 files changed, 8 insertions, 19 deletions
diff --git a/main/src/ui/add_conversation/add_conference_dialog.vala b/main/src/ui/add_conversation/add_conference_dialog.vala
index 5e5698fb..d840ff2a 100644
--- a/main/src/ui/add_conversation/add_conference_dialog.vala
+++ b/main/src/ui/add_conversation/add_conference_dialog.vala
@@ -36,7 +36,7 @@ public class AddConferenceDialog : Gtk.Dialog {
setup_conference_details_view();
show_jid_add_view();
- stream_interactor.get_module(MucManager.IDENTITY).joined.connect((account, jid, nick) => { Idle.add(() => { on_joined(account, jid, nick); return false; } ); });
+ stream_interactor.get_module(MucManager.IDENTITY).joined.connect(on_joined);
}
private void show_jid_add_view() {
diff --git a/main/src/ui/add_conversation/conference_details_fragment.vala b/main/src/ui/add_conversation/conference_details_fragment.vala
index 064d1053..fbe9245d 100644
--- a/main/src/ui/add_conversation/conference_details_fragment.vala
+++ b/main/src/ui/add_conversation/conference_details_fragment.vala
@@ -99,12 +99,7 @@ protected class ConferenceDetailsFragment : Box {
jid_entry.key_release_event.connect(() => { done = true; return false; }); // just for notifying
nick_entry.key_release_event.connect(() => { done = true; return false; });
- stream_interactor.get_module(MucManager.IDENTITY).enter_error.connect((account, jid, error) => {
- Idle.add(() => {
- on_enter_error(account, jid, error);
- return false;
- });
- });
+ stream_interactor.get_module(MucManager.IDENTITY).enter_error.connect(on_enter_error);
notification_button.clicked.connect(() => { notification_revealer.set_reveal_child(false); });
ok_button.clicked.connect(() => {
ok_button.label = _("Joining...");
diff --git a/main/src/ui/add_conversation/conference_list.vala b/main/src/ui/add_conversation/conference_list.vala
index 570166b1..8338558c 100644
--- a/main/src/ui/add_conversation/conference_list.vala
+++ b/main/src/ui/add_conversation/conference_list.vala
@@ -21,11 +21,8 @@ protected class ConferenceList : FilterableList {
set_sort_func(sort);
stream_interactor.get_module(MucManager.IDENTITY).bookmarks_updated.connect((account, conferences) => {
- Idle.add(() => {
- lists[account] = conferences;
- refresh_conferences();
- return false;
- });
+ lists[account] = conferences;
+ refresh_conferences();
});
foreach (Account account in stream_interactor.get_accounts()) {
@@ -43,11 +40,8 @@ protected class ConferenceList : FilterableList {
}
private void on_conference_bookmarks_received(Core.XmppStream stream, Account account, Gee.List<Xep.Bookmarks.Conference> conferences) {
- Idle.add(() => {
- lists[account] = conferences;
- refresh_conferences();
- return false;
- });
+ lists[account] = conferences;
+ refresh_conferences();
}
private void header(ListBoxRow row, ListBoxRow? before_row) {
diff --git a/main/src/ui/add_conversation/roster_list.vala b/main/src/ui/add_conversation/roster_list.vala
index 70e4bc14..3107dc47 100644
--- a/main/src/ui/add_conversation/roster_list.vala
+++ b/main/src/ui/add_conversation/roster_list.vala
@@ -25,12 +25,12 @@ protected class RosterList : FilterableList {
handler_ids += stream_interactor.get_module(RosterManager.IDENTITY).removed_roster_item.connect( (account, jid, roster_item) => {
if (accounts.contains(account)) {
- Idle.add(() => { on_removed_roster_item(account, jid, roster_item); return false;});
+ on_removed_roster_item(account, jid, roster_item);
}
});
handler_ids += stream_interactor.get_module(RosterManager.IDENTITY).updated_roster_item.connect( (account, jid, roster_item) => {
if (accounts.contains(account)) {
- Idle.add(() => { on_updated_roster_item(account, jid, roster_item); return false;});
+ on_updated_roster_item(account, jid, roster_item);
}
});
destroy.connect(() => {