]> git.notmuchmail.org Git - sup/commitdiff
various bugfixes
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 5 Feb 2007 00:00:40 +0000 (00:00 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 5 Feb 2007 00:00:40 +0000 (00:00 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@302 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/index.rb
lib/sup/thread.rb

index cf56b45dcba14d399afbb66cfd5be2de10df6ab4..16fd3b9aa8f55bc477e1be4c3319c0dab1ed8f97 100644 (file)
@@ -85,6 +85,7 @@ class Index
 
     raise "deleting non-corresponding entry #{docid}" unless @index[docid][:message_id] == m.id
 
+    m.labels = entry[:label].split(/\s+/).map { |x| x.intern }
     @index.delete docid
     add_message m
     docid, entry = load_entry_for_id m.id
index 1a92aea844646c6fdd00fb75986b99501adb2010..7082de16a15b427c7e798056d349c555bf40e5ec 100644 (file)
@@ -298,7 +298,7 @@ class ThreadSet
   end
 
   ## loads in all messages needed to thread m
-  def load_thread_for_message m, opts
+  def load_thread_for_message m, opts={}
     @index.each_message_in_thread_for m, opts.merge({:limit => 100}) do |mid, builder|
       next if contains_id? mid
       add_message builder.call