From: Art Cancro Date: Sat, 16 Jan 2010 05:11:09 +0000 (+0000) Subject: * When a 'read new' operation returns zero messages, make the 'older messages' link... X-Git-Tag: v7.86~497 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=3129e2199b035d1aca9f319b47f2aa95cf74cfc7;p=citadel.git * When a 'read new' operation returns zero messages, make the 'older messages' link available to start reading old messages from the end instead of the beginning of the room. --- diff --git a/webcit/bbsview_renderer.c b/webcit/bbsview_renderer.c index c80fde724..fefed4d4b 100644 --- a/webcit/bbsview_renderer.c +++ b/webcit/bbsview_renderer.c @@ -177,9 +177,26 @@ int bbsview_RenderView_or_Tail(SharedMessageStatus *Stat, /* Supply the link to prepend the previous 20 messages */ - if (doing_newer_messages == 0) { + if ((!WC->is_ajax) && (Stat->nummsgs == 0)) { + wc_printf("
", olderdiv); + wc_printf("", + olderdiv, + LONG_MAX, + Stat->maxmsgs + ); + + wc_printf("
" + "↑ ↑ ↑ %s ↑ ↑ ↑" + "
", _("older messages") + ); + wc_printf("
"); + wc_printf("

"); + wc_printf(_("No messages here.")); + wc_printf("
\n"); + wc_printf("
"); + } + else if (doing_newer_messages == 0) { wc_printf("
", olderdiv); - /* if (Stat->nummsgs > 0) { */ if (Stat->nummsgs > 0) { wc_printf("", olderdiv, @@ -196,19 +213,8 @@ int bbsview_RenderView_or_Tail(SharedMessageStatus *Stat, wc_printf("
"); } - - - /* Handle the empty message set gracefully... */ - if (Stat->nummsgs == 0) { - if (!WC->is_ajax) { - wc_printf("

"); - wc_printf(_("No messages here.")); - wc_printf("
\n"); - } - } - /* Non-empty message set... */ - else { + if (Stat->nummsgs > 0) { /* Render the messages */ for (i=0; inum_msgs; ++i) {