sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit e047e53b436eaed1c323c037ad3abcbe7ef67f71
parent d0fcf5c2420f97110f479cde3fbfd594c0b0faa9
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Sat, 29 Dec 2007 19:11:14 -0800

better documentation for Thread#first_useful_descendent

Diffstat:
M lib/sup/thread.rb | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb
@@ -185,6 +185,10 @@ class Container
   def root?; @parent.nil?; end
   def root; root? ? self : @parent.root; end
 
+  ## skip over any containers which are empty and have only one child. we use
+  ## this make the threaded display a little nicer, and only stick in the
+  ## "missing message" line when it's graphically necessary, i.e. when the
+  ## missing message has more than one descendent.
   def first_useful_descendant
     if empty? && @children.size == 1
       @children.first.first_useful_descendant