From: Ben Walton Date: Sat, 9 May 2009 01:23:48 +0000 (-0400) Subject: Small cleanup: Don't use $config in main code. X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=8b1d48618e40409e6ab8fc8dd4314744995228f8;p=sup Small cleanup: Don't use $config in main code. Switched use of $config[:sent_source] to SentManager.source_uri to keep $config use limited to startup/initialization. Signed-off-by: Ben Walton --- diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index d8de5e2..6f9e398 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -137,14 +137,14 @@ EOS def add_messages_from source, opts={} begin return if source.done? || source.has_errors? - + source.each do |offset, labels| if source.has_errors? Redwood::log "error loading messages from #{source}: #{source.error.message}" return end - labels << :sent if source.uri.eql?($config[:sent_source]) + labels << :sent if source.uri.eql?(SentManager.source_uri) labels.each { |l| LabelManager << l } labels = labels + (source.archived? ? [] : [:inbox])