diff options
author | Marvin W <git@larma.de> | 2018-01-12 21:03:09 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2018-01-28 00:38:47 +0100 |
commit | 782ae4c049e2b6fab13d7453cbb0e74610e7d200 (patch) | |
tree | 1b4cd0a1689cee0c2e2cac2ae9a5fb8ebbe63621 /main/src/ui/add_conversation/conference_list.vala | |
parent | d46d071e57e599e8cfb1780597cbecb36881c4d8 (diff) | |
download | dino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.tar.gz dino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.zip |
Move Jid class to xmpp-vala, partially refactor namespace
Diffstat (limited to 'main/src/ui/add_conversation/conference_list.vala')
-rw-r--r-- | main/src/ui/add_conversation/conference_list.vala | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/main/src/ui/add_conversation/conference_list.vala b/main/src/ui/add_conversation/conference_list.vala index 8338558c..dfe80a66 100644 --- a/main/src/ui/add_conversation/conference_list.vala +++ b/main/src/ui/add_conversation/conference_list.vala @@ -39,8 +39,12 @@ protected class ConferenceList : FilterableList { } } - private void on_conference_bookmarks_received(Core.XmppStream stream, Account account, Gee.List<Xep.Bookmarks.Conference> conferences) { - lists[account] = conferences; + private void on_conference_bookmarks_received(XmppStream stream, Account account, Gee.List<Xep.Bookmarks.Conference>? conferences) { + if (conferences == null) { + lists.unset(account); + } else { + lists[account] = conferences; + } refresh_conferences(); } @@ -77,15 +81,15 @@ internal class ConferenceListRow : ListRow { public Xep.Bookmarks.Conference bookmark; public ConferenceListRow(StreamInteractor stream_interactor, Xep.Bookmarks.Conference bookmark, Account account) { - this.jid = new Jid(bookmark.jid); + this.jid = bookmark.jid; this.account = account; this.bookmark = bookmark; - name_label.label = bookmark.name ?? bookmark.jid; + name_label.label = bookmark.name ?? bookmark.jid.to_string(); if (stream_interactor.get_accounts().size > 1) { via_label.label = "via " + account.bare_jid.to_string(); - } else if (bookmark.name != null && bookmark.name != bookmark.jid) { - via_label.label = bookmark.jid; + } else if (bookmark.name != null && bookmark.name != bookmark.jid.to_string()) { + via_label.label = bookmark.jid.to_string(); } else { via_label.visible = false; } |