commit 48f08f21707b4cd6bffdc5379b9aa854194ed932
parent 0fdf24ead3975a91254ef0941519de9fefb0aae1
Author: William Morgan <w@adap.tv>
Date: Mon, 17 Mar 2008 09:26:28 -0700
threading bugfix when threading by subject
Diffstat:
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb
@@ -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]