]> git.cworth.org Git - sup/commitdiff
whoops, archived? checking needs to go in poll
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 21 Feb 2007 03:31:32 +0000 (03:31 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 21 Feb 2007 03:31:32 +0000 (03:31 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@337 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/poll.rb
lib/sup/source.rb

index 8914d1d56b150cc01d5c747a52011e996353f688..4d1f1efa4a55805f49e9850cc422e65baa217e0d 100644 (file)
@@ -91,6 +91,7 @@ class PollManager
         end
       
         labels.each { |l| LabelManager << l }
+        labels += [:inbox] unless source.archived?
 
         begin
           m = Message.new :source => source, :source_info => offset, :labels => labels
index 02f661a406c19f6ae842f7653270da58f8154e09..d3f96e179126a2a1e6f988bee5492e0b1e0dfe63 100644 (file)
@@ -95,7 +95,7 @@ class Source
       until done? || broken? # just like life!
         n, labels = self.next
         raise "no message" unless n
-        yield n, labels + (archived? ? [] : [:inbox])
+        yield n, labels
       end
     rescue SourceError => e
       self.broken_msg = e.message