Don't move opened conversation to the top of the list, scroll along with selected conversation
fixes #544
This commit is contained in:
parent
a960740c3e
commit
cbe0ff2c1d
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue