client: Respect autoselect setting

#1516
This commit is contained in:
Cédric Bellegarde 2023-07-12 09:50:42 +02:00
parent 186b5a6d7b
commit 4a232d4a08
2 changed files with 4 additions and 3 deletions

View file

@ -2391,7 +2391,8 @@ public class Application.MainWindow :
private void on_folder_activated(Geary.Folder? folder) {
if (folder != null) {
go_to_next_pane();
// Focus on conversation list will autoselect
go_to_next_pane(!this.application.config.autoselect);
}
}

View file

@ -558,13 +558,13 @@ public class ConversationList.View : Gtk.ScrolledWindow, Geary.BaseInterface {
*/
private void on_conversations_removed(bool start) {
// Before model update, just find a conversation
if (start) {
if (this.config.autoselect && start) {
this.to_restore_row = get_next_conversation();
// If in selection mode, leaving will do the job
} else if (this.selection_mode_enabled) {
this.selection_mode_enabled = false;
// Set next conversation
} else {
} else if (this.config.autoselect) {
restore_row();
}
}