Index: lib/sup/modes/thread-index-mode.rb =================================================================== --- lib/sup/modes/thread-index-mode.rb (revision 665) +++ lib/sup/modes/thread-index-mode.rb (working copy) @@ -34,6 +34,7 @@ @load_thread_opts = load_thread_opts @hidden_labels = hidden_labels + LabelManager::HIDDEN_RESERVED_LABELS @date_width = DATE_WIDTH + @unread_size_width = nil @size_width = nil @tags = Tagger.new self @@ -136,6 +137,7 @@ ## let's see you do THIS in python @threads = @ts.threads.select { |t| !@hidden_threads[t] }.sort_by { |t| t.date }.reverse @size_width = (@threads.max_of { |t| t.size } || 0).num_digits + @unread_size_width = (@threads.max_of { |t| t.unread_size} || 0).num_digits regen_text end @@ -551,7 +553,8 @@ ] + from + [ - [subj_color, t.size == 1 ? " " * (@size_width + 2) : sprintf("(%#{@size_width}d)", t.size)], + #[subj_color, t.size == 1 ? " " * (@size_width + 2) : sprintf("(%#{@size_width}d)", t.size)], + [subj_color, sprintf("(%#{@unread_size_width}d/%#{@size_width}d)", t.unread_size, t.size)], [:to_me_color, dp ? " >" : (p ? ' +' : " ")], [subj_color, t.subj + (t.subj.empty? ? "" : " ")], ] + Index: lib/sup/thread.rb =================================================================== --- lib/sup/thread.rb (revision 665) +++ lib/sup/thread.rb (working copy) @@ -118,6 +118,9 @@ end def size; map { |m, *o| m ? 1 : 0 }.sum; end + + def unread_size; map { |m, *o| m && m.has_label?(:unread) ? 1 : 0 }.sum; end + def subj; argfind { |m, *o| m && m.subj }; end def labels map { |m, *o| m && m.labels }.flatten.compact.uniq.sort_by { |t| t.to_s }