* Cleaned up the logic at the end of the bbsview display. Still not sure what we...
authorArt Cancro <ajc@citadel.org>
Wed, 30 Dec 2009 18:00:56 +0000 (18:00 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 30 Dec 2009 18:00:56 +0000 (18:00 +0000)
webcit/bbsview_renderer.c

index 115cd92c5a27b620c7d70990180a330b115a8e43..b8daa112b8cecf27ede6ad9d06daa1a0c30a3db0 100644 (file)
@@ -468,7 +468,8 @@ int bbsview_RenderView_or_Tail(SharedMessageStatus *Stat,
        }
 
        wc_printf("<div id=\"%s\">", morediv);
-       if (Stat->nummsgs > 0) {
+       /* if (Stat->nummsgs > 0) { */
+       if (Stat->nummsgs >= Stat->maxmsgs) {
                wc_printf("<a href=\"javascript:moremsgs('%s', %ld, %ld, %d );\">",
                        morediv,
                        BBS->msgs[BBS->num_msgs-1],
@@ -483,10 +484,23 @@ int bbsview_RenderView_or_Tail(SharedMessageStatus *Stat,
                wc_printf("</a>");
        }
        else {
-               wc_printf("<div class=\"moreprompt\">"
-                       "&darr; &darr; &darr; %s &darr; &darr; &darr;"
-                       "</div>", "no more messages FIXME"
+               long gt = 0;    /* if new messages appear later, where will they begin? */
+               if (Stat->nummsgs > 0) {
+                       gt = BBS->msgs[BBS->num_msgs-1];
+               }
+               else {
+                       gt = atol(bstr("gt"));
+               }
+               wc_printf("<a href=\"javascript:moremsgs('%s', %ld, %ld, %d );\">",
+                       morediv,
+                       gt,
+                       Stat->maxmsgs,
+                       (Stat->reverse ? 2 : 1)
                );
+               wc_printf("<div class=\"moreprompt\">");
+               wc_printf("no more ... gt would have been %ld ... FIXME", gt);
+               wc_printf("</div>");
+               wc_printf("</a>");
        }
        wc_printf("<br><br><br><br></div>");