From: Ben Walton Date: Thu, 7 May 2009 21:46:51 +0000 (-0400) Subject: Sent label handling change X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=5b8724346cfa405b1b4f5cd358595226a79f6b2c;p=sup Sent label handling change Make PollManager add the 'sent' label if the source it's collecting messages from is the configured sent source. Remove the sent label from SentLoader, which makes it even less 'special.' Signed-off-by: Ben Walton --- diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index fb4abb2..d8de5e2 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -143,7 +143,8 @@ EOS Redwood::log "error loading messages from #{source}: #{source.error.message}" return end - + + labels << :sent if source.uri.eql?($config[:sent_source]) labels.each { |l| LabelManager << l } labels = labels + (source.archived? ? [] : [:inbox]) diff --git a/lib/sup/sent.rb b/lib/sup/sent.rb index bad2083..935da2a 100644 --- a/lib/sup/sent.rb +++ b/lib/sup/sent.rb @@ -53,7 +53,7 @@ class SentLoader < MBox::Loader def uri; 'sup://sent' end def id; 9998; end - def labels; [:sent, :inbox]; end + def labels; [:inbox]; end end end