]> git.notmuchmail.org Git - sup/commitdiff
bugfix: snippets calculated for new messages
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 18 Dec 2007 09:37:04 +0000 (01:37 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 18 Dec 2007 09:37:04 +0000 (01:37 -0800)
a previous change exposed a bug where message chunks were not being created on
demand.

lib/sup/message.rb

index 1c84d79d9881c6c19ffe08fdb41af795d67d42bc..c3c69200a003df607dd4a2ffe6eed21bbb85ea8f 100644 (file)
@@ -39,7 +39,7 @@ class Message
 
   attr_reader :id, :date, :from, :subj, :refs, :replytos, :to, :source,
               :cc, :bcc, :labels, :list_address, :recipient_email, :replyto,
-              :source_info, :chunks, :list_subscribe, :list_unsubscribe
+              :source_info, :list_subscribe, :list_unsubscribe
 
   bool_reader :dirty, :source_marked_read, :snippet_contains_encrypted_content
 
@@ -154,6 +154,11 @@ class Message
     @dirty = true
   end
 
+  def chunks
+    load_from_source!
+    @chunks
+  end
+
   ## this is called when the message body needs to actually be loaded.
   def load_from_source!
     @chunks ||=