diff options
7 files changed, 8 insertions, 7 deletions
diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala index 1965e13d..66efe56e 100644 --- a/libdino/src/service/conversation_manager.vala +++ b/libdino/src/service/conversation_manager.vala @@ -95,8 +95,8 @@ public class ConversationManager : StreamInteractionModule, Object { return ret; } - public void start_conversation(Conversation conversation, bool push_front = false) { - if (push_front) { + public void start_conversation(Conversation conversation) { + if (conversation.last_active == null) { conversation.last_active = new DateTime.now_utc(); if (conversation.active) conversation_activated(conversation); } diff --git a/main/src/ui/add_conversation/add_conference_dialog.vala b/main/src/ui/add_conversation/add_conference_dialog.vala index c9bc42ad..fb1a2aca 100644 --- a/main/src/ui/add_conversation/add_conference_dialog.vala +++ b/main/src/ui/add_conversation/add_conference_dialog.vala @@ -141,7 +141,7 @@ public class AddConferenceDialog : Gtk.Dialog { private void on_joined(Account account, Jid jid, string nick) { if (account.equals(details_fragment.account) && jid.equals_bare(new Jid(details_fragment.jid))) { Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(jid, account, Conversation.Type.GROUPCHAT); - stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation, true); + stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation); conversation_opened(conversation); close(); } diff --git a/main/src/ui/add_conversation/select_contact_dialog.vala b/main/src/ui/add_conversation/select_contact_dialog.vala index 6b9d4947..b387787a 100644 --- a/main/src/ui/add_conversation/select_contact_dialog.vala +++ b/main/src/ui/add_conversation/select_contact_dialog.vala @@ -86,7 +86,7 @@ public class AddChatDialog : SelectContactDialog { ok_button.label = _("Start"); selected.connect((account, jid) => { Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(jid, account, Conversation.Type.CHAT); - stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation, true); + stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation); added(conversation); }); } diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 29dec20c..6ea8eb01 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -66,7 +66,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { Gee.List<Account> accounts = stream_interactor.get_accounts(); if (accounts.size == 1) { Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(new Jid(jid), accounts[0], Conversation.Type.CHAT); - stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation, true); + stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation); window.on_conversation_selected(conversation); } else { AddChatDialog dialog = new AddChatDialog(stream_interactor, stream_interactor.get_accounts()); diff --git a/main/src/ui/conversation_selector/conversation_selector.vala b/main/src/ui/conversation_selector/conversation_selector.vala index d795120b..dd264206 100644 --- a/main/src/ui/conversation_selector/conversation_selector.vala +++ b/main/src/ui/conversation_selector/conversation_selector.vala @@ -68,6 +68,7 @@ public class ConversationSelector : ListBox { if (!rows.has_key(conversation)) { add_conversation(conversation); } + rows[conversation].grab_focus(); this.select_row(rows[conversation]); } diff --git a/main/src/ui/conversation_summary/subscription_notification.vala b/main/src/ui/conversation_summary/subscription_notification.vala index 225e4b00..d493ff78 100644 --- a/main/src/ui/conversation_summary/subscription_notification.vala +++ b/main/src/ui/conversation_summary/subscription_notification.vala @@ -16,7 +16,7 @@ public class SubscriptionNotitication : Object { stream_interactor.get_module(PresenceManager.IDENTITY).received_subscription_request.connect((jid, account) => { Conversation relevant_conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(jid, account, Conversation.Type.CHAT); - stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(relevant_conversation, true); + stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(relevant_conversation); if (conversation != null && account.equals(conversation.account) && jid.equals(conversation.counterpart)) { show_notification(); } diff --git a/main/src/ui/occupant_menu/view.vala b/main/src/ui/occupant_menu/view.vala index 0d11a310..119d7cfe 100644 --- a/main/src/ui/occupant_menu/view.vala +++ b/main/src/ui/occupant_menu/view.vala @@ -106,7 +106,7 @@ public class View : Popover { if (list_row == null) return; Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(list_row.jid, list_row.account, Conversation.Type.GROUPCHAT_PM); - stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation, true); + stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation); } private void kick_button_clicked() { |