]> git.cworth.org Git - sup/blobdiff - lib/sup/thread.rb
move MBox.parse_header -> Source.parse_raw_email_header
[sup] / lib / sup / thread.rb
index f7fb39ed9b22c96dbf7999e82ef3ebf575360968..99f21dc31a07bfcb3424a1fc206e20133e2ec8ab 100644 (file)
@@ -415,14 +415,8 @@ class ThreadSet
     ## that we first added a child message with a different
     ## subject)
     if root.thread
-      unless @threads[key] == root.thread
-        if @threads[key]
-          root.thread.empty!
-          @threads[key] << root
-          root.thread = @threads[key]
-        else
-          @threads[key] = root.thread
-        end
+      if @threads.member?(key) && @threads[key] != root.thread
+        @threads.delete key
       end
     else
       thread = @threads[key]