client: Fix next conversation selection on mail merge
When conversation monitor is merging emails, we need to calculate next selected conversation. This may happen even if no conversation is currently selected resulting on second conversation being selected. Only return a valid conversation if current selection is not empty.
This commit is contained in:
parent
aaaf657b35
commit
f4ea4a282a
1 changed files with 7 additions and 1 deletions
|
|
@ -512,8 +512,14 @@ public class ConversationList.View : Gtk.ScrolledWindow, Geary.BaseInterface {
|
|||
*/
|
||||
private Gtk.ListBoxRow? get_next_conversation(bool asc=true) {
|
||||
int index = asc ? 0 : int.MAX;
|
||||
GLib.List<unowned Gtk.ListBoxRow> selected_rows;
|
||||
|
||||
foreach (Gtk.ListBoxRow row in this.list.get_selected_rows().copy()) {
|
||||
selected_rows = this.list.get_selected_rows();
|
||||
if (selected_rows.length() == 0 ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach (var row in selected_rows) {
|
||||
if ((asc && row.get_index() > index) ||
|
||||
(!asc && row.get_index() < index)) {
|
||||
index = row.get_index();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue