[geary/wip/search-cleanup: 4/9] Fix default value for ConversationOperation::allow_duplicates



commit 0f73a26ac5f336b07b93cf8bec705d698f226070
Author: Michael Gratton <mike vee net>
Date:   Mon Feb 4 00:18:14 2019 +1100

    Fix default value for ConversationOperation::allow_duplicates
    
    Make the default true, which is required for most operations. In
    particular, this was preventing conversations from being removed from
    a search when two remove ops were queued in quick succession.
    
    Make InsertOperation use the default since if we don't want to ignore
    email inserted if it happens twice in quick succession. This may fix
    the conversation list sometimes getting stuck when being filled.

 src/engine/app/conversation-monitor/app-conversation-operation.vala | 2 +-
 src/engine/app/conversation-monitor/app-insert-operation.vala       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/app/conversation-monitor/app-conversation-operation.vala 
b/src/engine/app/conversation-monitor/app-conversation-operation.vala
index fd57b5ec..08e2c4a2 100644
--- a/src/engine/app/conversation-monitor/app-conversation-operation.vala
+++ b/src/engine/app/conversation-monitor/app-conversation-operation.vala
@@ -24,7 +24,7 @@ internal abstract class Geary.App.ConversationOperation : BaseObject {
 
 
     public ConversationOperation(ConversationMonitor? monitor,
-                                 bool allow_duplicates = false) {
+                                 bool allow_duplicates = true) {
         this.monitor = monitor;
         this.allow_duplicates = allow_duplicates;
     }
diff --git a/src/engine/app/conversation-monitor/app-insert-operation.vala 
b/src/engine/app/conversation-monitor/app-insert-operation.vala
index 76664ba1..f97f689b 100644
--- a/src/engine/app/conversation-monitor/app-insert-operation.vala
+++ b/src/engine/app/conversation-monitor/app-insert-operation.vala
@@ -15,7 +15,7 @@ private class Geary.App.InsertOperation : ConversationOperation {
 
     public InsertOperation(ConversationMonitor monitor,
                            Gee.Collection<EmailIdentifier> inserted_ids) {
-        base(monitor, false);
+        base(monitor);
         this.inserted_ids = inserted_ids;
     }
 


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