From 1d0745177e7a116455811dfd26e07b848cb89b75 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 6 Nov 2017 01:02:13 +0100 Subject: [PATCH] Replace deprecated function usages --- libdino/src/service/connection_manager.vala | 4 +--- libdino/src/service/conversation_manager.vala | 1 + main/data/add_conversation/add_contact_dialog.ui | 2 +- main/data/add_conversation/add_groupchat_dialog.ui | 6 +++--- main/data/add_conversation/conference_details_fragment.ui | 4 ++-- main/src/ui/add_conversation/add_groupchat_dialog.vala | 8 ++++---- main/src/ui/application.vala | 2 +- main/src/ui/contact_details/dialog.vala | 4 ++-- main/src/ui/manage_accounts/dialog.vala | 2 +- main/src/ui/occupant_menu/list.vala | 4 ++-- plugins/omemo/src/account_settings_widget.vala | 3 ++- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/libdino/src/service/connection_manager.vala b/libdino/src/service/connection_manager.vala index 4c72f229..d0a11cd5 100644 --- a/libdino/src/service/connection_manager.vala +++ b/libdino/src/service/connection_manager.vala @@ -140,9 +140,7 @@ public class ConnectionManager { Xmpp.Presence.Stanza presence = new Xmpp.Presence.Stanza(); presence.type_ = Xmpp.Presence.Stanza.TYPE_UNAVAILABLE; change_connection_state(account, ConnectionState.DISCONNECTED); - try { - connections[account].stream.get_module(Presence.Module.IDENTITY).send_presence(connections[account].stream, presence); - } catch (Error e) { print(@"on_prepare_for_sleep error $(e.message)\n"); } + connections[account].stream.get_module(Presence.Module.IDENTITY).send_presence(connections[account].stream, presence); } public void disconnect(Account account) { diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala index 471ec74a..44b16d68 100644 --- a/libdino/src/service/conversation_manager.vala +++ b/libdino/src/service/conversation_manager.vala @@ -34,6 +34,7 @@ public class ConversationManager : StreamInteractionModule, Object { public Conversation create_conversation(Jid jid, Account account, Conversation.Type? type = null) { assert(conversations.has_key(account)); if (conversations[account].has_key(jid)) { + conversations[account][jid].type_ = type; return conversations[account][jid]; } else { Conversation conversation = new Conversation(jid, account, type); diff --git a/main/data/add_conversation/add_contact_dialog.ui b/main/data/add_conversation/add_contact_dialog.ui index c2077647..abf9d892 100644 --- a/main/data/add_conversation/add_contact_dialog.ui +++ b/main/data/add_conversation/add_contact_dialog.ui @@ -1,7 +1,7 @@