]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: cleanup permalink Thread: header display
authorEric Wong <e@80x24.org>
Sat, 30 Jan 2016 23:28:37 +0000 (23:28 +0000)
committerEric Wong <e@80x24.org>
Sat, 30 Jan 2016 23:28:37 +0000 (23:28 +0000)
The word "skip" can be confusing.  Instead, spell out "scroll down"
for the user to read and only display that text when the thread
is sufficiently long.

lib/PublicInbox/View.pm

index e72243be037387b2d799211001fd492a526bccee..88ab2d2f730a3cbb3fe58394dd7fa29a2c69afb9 100644 (file)
@@ -475,8 +475,11 @@ sub thread_inline {
                return;
        }
 
-       $$dst .= "~$nr messages (<a\nhref=\"#b\">skip</a> / " .
-                $expand . ")\n";
+       $$dst .= "~$nr messages ($expand";
+       if ($nr > MAX_INLINE_QUOTED) {
+               $$dst .= qq! / <a\nhref="#b">[scroll down]</a>!;
+       }
+       $$dst .= ")\n";
 
        my $subj = $srch->subject_path($cur->header('Subject'));
        my $state = {