[geary/wip/search-cleanup: 1/5] Fix default value for ConversationOperation::allow_duplicates



commit 6be12937f2c9decd5b89d9f2abfc8fc615e130d0
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, for the same
    reason.

 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]