]> git.cworth.org Git - sup/commitdiff
Small cleanup: Don't use $config in main code.
authorBen Walton <bwalton@artsci.utoronto.ca>
Sat, 9 May 2009 01:23:48 +0000 (21:23 -0400)
committerBen Walton <bwalton@artsci.utoronto.ca>
Thu, 28 May 2009 15:27:26 +0000 (11:27 -0400)
Switched use of $config[:sent_source] to SentManager.source_uri
to keep $config use limited to startup/initialization.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
lib/sup/poll.rb

index d8de5e2acd319fdbd73c864891ee70266ce93fcc..6f9e398c5b5f956862cc6b962e4522054b055aca 100644 (file)
@@ -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])