From: William Morgan Date: Sun, 6 Sep 2009 13:45:25 +0000 (-0400) Subject: bugfix: :sent label not being applied to sent messages X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=4efc8adaf8c63ff054c71149de6c12fe8194ff03;p=sup bugfix: :sent label not being applied to sent messages At least, for mbox sent sources. Modify the mbox source so that it calls self.labels for the message labels instead of directly using @labels. This allows the SentLoader subclass to apply the sent label by defining #labels. --- diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb index 0307594..a11bf95 100644 --- a/lib/sup/mbox/loader.rb +++ b/lib/sup/mbox/loader.rb @@ -9,6 +9,8 @@ class Loader < Source include SerializeLabelsNicely yaml_properties :uri, :cur_offset, :usual, :archived, :id, :labels + attr_reader :labels + ## uri_or_fp is horrific. need to refactor. def initialize uri_or_fp, start_offset=0, usual=true, archived=false, id=nil, labels=nil @mutex = Mutex.new @@ -169,7 +171,7 @@ class Loader < Source end self.cur_offset = next_offset - [returned_offset, (@labels + [:unread])] + [returned_offset, (labels + [:unread])] end end