lib/PublicInbox/View.pm | 9 +++------ diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 26094082996678975a5830876f00c0de431d9b91..c28505f111424fdd03fe5aa8175deb5ce4c575ba 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -1192,7 +1192,7 @@ if ($prev) { # aligned padding for: 'next (older) | ' $next = $next ? "$next | " : ' | '; $prev .= qq[ | latest]; } - "
page: $next$prev"; + ($next || $prev) ? \"
page: $next$prev" : \''; } sub paginate_recent ($$) { @@ -1243,11 +1243,8 @@ # GET /$INBOX - top-level inbox view for indexed inboxes sub index_topics { my ($ctx) = @_; my $msgs = paginate_recent($ctx, 200); # 200 is our window - if (@$msgs) { - walk_thread(thread_results($ctx, $msgs), $ctx, \&acc_topic); - } - html_oneshot($ctx, dump_topics($ctx), \pagination_footer($ctx, '.')); - + walk_thread(thread_results($ctx, $msgs), $ctx, \&acc_topic) if @$msgs; + html_oneshot($ctx, dump_topics($ctx), pagination_footer($ctx, '.')); } sub thread_adj_level {