From: William Morgan Date: Wed, 20 Feb 2008 17:37:50 +0000 (-0800) Subject: bugfix: ThreadSet claiming non-relevant videos are actually relevant X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=d371c081ebe557cbe67b2428f75c9471a480e8ef;p=sup bugfix: ThreadSet claiming non-relevant videos are actually relevant 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) --- diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb index 09fbfbb..f7fb39e 100644 --- a/lib/sup/thread.rb +++ b/lib/sup/thread.rb @@ -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