commit 4efc8adaf8c63ff054c71149de6c12fe8194ff03
parent 46f8e5116f38c8248fdc8553db18f8d2132a1f46
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Sun, 6 Sep 2009 09:45:25 -0400
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.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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