]> git.cworth.org Git - sup/commitdiff
minor update: read detecting
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 21 Feb 2007 04:08:38 +0000 (04:08 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 21 Feb 2007 04:08:38 +0000 (04:08 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@340 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/maildir.rb

index f15befcdea4290eaa0ea2cd78912109da7e82973..e817eee589435eb89200e63ea429a936e1ba1ba3 100644 (file)
@@ -17,7 +17,6 @@ class Maildir < Source
     @dir = URI(uri).path
     @ids = []
     @ids_to_fns = {}
-    @labels = [:unread]
     @last_scan = nil
     @mutex = Mutex.new
   end
@@ -78,7 +77,7 @@ class Maildir < Source
     start.upto(@ids.length - 1) do |i|         
       id = @ids[i]
       self.cur_offset = id
-      yield id, @labels.clone
+      yield id, (@ids_to_fns[id] =~ /,.*R.*$/ ? [] : [:unread])
     end
   end