aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/add_conversation/conference
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-06-13 18:14:59 +0200
committerfiaxh <git@mx.ax.lt>2017-06-13 20:12:40 +0200
commit7bbbb738fdb233f4ad91ffdd7d9247b28849d715 (patch)
tree649ac26e3feef6bae614442a7f3d6ee1057336e0 /main/src/ui/add_conversation/conference
parentdabc2a8b1d2a7bf2019e5f913c736d80f11ceb53 (diff)
downloaddino-7bbbb738fdb233f4ad91ffdd7d9247b28849d715.tar.gz
dino-7bbbb738fdb233f4ad91ffdd7d9247b28849d715.zip
Get rid of manual storage objects for delegates
Diffstat (limited to 'main/src/ui/add_conversation/conference')
-rw-r--r--main/src/ui/add_conversation/conference/conference_list.vala14
1 files changed, 6 insertions, 8 deletions
diff --git a/main/src/ui/add_conversation/conference/conference_list.vala b/main/src/ui/add_conversation/conference/conference_list.vala
index ac74fa3a..1f4abfa3 100644
--- a/main/src/ui/add_conversation/conference/conference_list.vala
+++ b/main/src/ui/add_conversation/conference/conference_list.vala
@@ -29,7 +29,7 @@ protected class ConferenceList : FilterableList {
});
foreach (Account account in stream_interactor.get_accounts()) {
- stream_interactor.get_module(MucManager.IDENTITY).get_bookmarks(account, on_conference_bookmarks_received, Tuple.create(this, account));
+ stream_interactor.get_module(MucManager.IDENTITY).get_bookmarks(account, (stream, conferences) => { on_conference_bookmarks_received(stream, account, conferences); });
}
}
@@ -42,13 +42,11 @@ protected class ConferenceList : FilterableList {
}
}
- private static void on_conference_bookmarks_received(Core.XmppStream stream, Gee.List<Xep.Bookmarks.Conference> conferences, Object? o) {
+ private void on_conference_bookmarks_received(Core.XmppStream stream, Account account, Gee.List<Xep.Bookmarks.Conference> conferences) {
Idle.add(() => {
- Tuple<ConferenceList, Account> tuple = o as Tuple<ConferenceList, Account>;
- ConferenceList list = tuple.a;
- Account account = tuple.b;
- list.lists[account] = conferences;
- list.refresh_conferences(); return false;
+ lists[account] = conferences;
+ refresh_conferences();
+ return false;
});
}
@@ -102,4 +100,4 @@ internal class ConferenceListRow : ListRow {
}
}
-} \ No newline at end of file
+}