From 4efc8adaf8c63ff054c71149de6c12fe8194ff03 Mon Sep 17 00:00:00 2001 From: William Morgan Date: Sun, 6 Sep 2009 09:45:25 -0400 Subject: [PATCH] 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. --- lib/sup/mbox/loader.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.43.0