]> git.notmuchmail.org Git - sup/blobdiff - lib/sup/modes/thread-index-mode.rb
ThreadIndexMode: handle deleted updates correctly
[sup] / lib / sup / modes / thread-index-mode.rb
index 0809d54b0b7a7346ce0415746b05050b376cca96..5985cae25deb3998d8569c6e1d3266244ebd81bc 100644 (file)
@@ -166,10 +166,9 @@ EOS
   end
 
   def handle_deleted_update sender, m
-    @ts_mutex.synchronize do
-      return unless @ts.contains? m
-      @ts.remove_thread_containing_id m.id
-    end
+    t = @ts_mutex.synchronize { @ts.thread_for m }
+    return unless t
+    hide_thread t
     update
   end