]> git.cworth.org Git - sup/commitdiff
in thread-view-mode, when editing labels, edit thread labels rather than individual...
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 29 Oct 2007 14:44:27 +0000 (14:44 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 29 Oct 2007 14:44:27 +0000 (14:44 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@644 5c8cc53c-5e98-4d25-b20a-d8db53a31250

doc/TODO
lib/sup/modes/thread-view-mode.rb

index f73afa1c539dcfb721a5ab29bbc60c18a2654b8d..df4e157ab07115e410aa259619ab569f19194329 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -14,6 +14,10 @@ x hookability
 
 for 0.3
 -------
+_ mark thread as unread should remember the unread messages and mark
+   only them as unread, just like gmail
+_ mark thread as unread should have a version within thread-view-mode
+   which then also closes the buffer
 _ bugfix: time zone parsing broken?
 _ mailing list auto-subscribe/unsubscribe
 _ forwards optionally include attachments
index 9c53242b0837bc77de9ca02f987aa5a3a2c01037..f00e19c670737331a89ab36d204e38e194cb2ab7 100644 (file)
@@ -139,15 +139,12 @@ class ThreadViewMode < LineCursorMode
   end    
 
   def edit_labels
-    m = @message_lines[curpos] or return
-
-    reserved_labels = m.labels.select { |l| LabelManager::RESERVED_LABELS.include? l }
-    new_labels = BufferManager.ask_for_labels :label, "Labels for message: ", m.labels
+    reserved_labels = @thread.labels.select { |l| LabelManager::RESERVED_LABELS.include? l }
+    new_labels = BufferManager.ask_for_labels :label, "Labels for thread: ", @thread.labels
 
     return unless new_labels
-    m.labels = (reserved_labels + new_labels).uniq
+    @thread.labels = (reserved_labels + new_labels).uniq
     new_labels.each { |l| LabelManager << l }
-    ## TODO: don't recalculate EVERYTHING
     update
     UpdateManager.relay self, :label, m
   end
@@ -443,7 +440,7 @@ private
         rest += format_person_list "   Bcc: ", m.bcc
       end
 
-      show_labels = m.labels - LabelManager::HIDDEN_RESERVED_LABELS
+      show_labels = @thread.labels - LabelManager::HIDDEN_RESERVED_LABELS
       rest += [
         "   Date: #{m.date.strftime DATE_FORMAT} (#{m.date.to_nice_distance_s})",
         "   Subject: #{m.subj}",