]> git.notmuchmail.org Git - sup/commitdiff
bugfix: ThreadSet claiming non-relevant videos are actually relevant
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 20 Feb 2008 17:37:50 +0000 (09:37 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 20 Feb 2008 23:27:04 +0000 (15:27 -0800)
The call to @messages[mid] was a mistake because @messages is a SavingHash.
This was inserting spurious entries into @messages, which then caused
ThreadSet#relevant? to return true for any non-first messages in a thread (the
first one would be falsely added to @messages)

lib/sup/thread.rb

index 09fbfbbab81d5f6d6814a3e96e166e73370b4bd3..f7fb39ed9b22c96dbf7999e82ef3ebf575360968 100644 (file)
@@ -259,7 +259,7 @@ class ThreadSet
     @thread_by_subj = thread_by_subj
   end
 
-  def thread_for_id mid; (c = @messages[mid]) && c.root.thread end
+  def thread_for_id mid; @messages.member?(mid) && @messages[mid].root.thread end
   def contains_id? id; @messages.member?(id) && !@messages[id].empty? end
   def thread_for m; thread_for_id m.id end
   def contains? m; contains_id? m.id end