commit 47b63308254b5e70157a3c0ac63dcebf36f8c319
parent 52586c0d2d4d5087796ec1f1ce768bf801b62ba9
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Mon, 29 Oct 2007 14:44:27 +0000
in thread-view-mode, when editing labels, edit thread labels rather than individual message labels
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@644 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git 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
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
@@ -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}",