[geary/wip/draft-management: 24/27] Fix double-clicking on a draft in the conversation list



commit e0373425839ef336f3a1aafe147e7e27338beaeb
Author: Michael Gratton <mike vee net>
Date:   Fri Aug 2 11:46:55 2019 +1000

    Fix double-clicking on a draft in the conversation list
    
    Along with commit 070e2f52, by avoiding checking if we need to close
    open composers on the second/third clicks of a double/triple click,
    ensures that double-clicks on drafts in the conversation list works
    correctly.
    
    See #72

 src/client/conversation-list/conversation-list-view.vala | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/client/conversation-list/conversation-list-view.vala 
b/src/client/conversation-list/conversation-list-view.vala
index 6dad0ff9..27861e3d 100644
--- a/src/client/conversation-list/conversation-list-view.vala
+++ b/src/client/conversation-list/conversation-list-view.vala
@@ -314,7 +314,12 @@ public class ConversationListView : Gtk.TreeView, Geary.BaseInterface {
             }
         }
 
-        if (!get_selection().path_is_selected(path)) {
+        // Check if changing the selection will require any composers
+        // to be closed, but only on the first click of a
+        // double/triple click, so that double-clicking a draft
+        // doesn't attempt to load it then close it straight away.
+        if (event.type == Gdk.EventType.BUTTON_PRESS &&
+            !get_selection().path_is_selected(path)) {
             MainWindow? parent = get_toplevel() as MainWindow;
             if (parent != null && !parent.close_composer()) {
                 return true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]