From: Art Cancro Date: Tue, 19 Oct 2010 21:42:33 +0000 (-0400) Subject: Temporary text renderer for blog view, displays posts and the comment count X-Git-Tag: v8.01~656^2 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=1e9cc995c11e8d71792bcb37b1e4eb5ca7f82973 Temporary text renderer for blog view, displays posts and the comment count --- diff --git a/webcit/blogview_renderer.c b/webcit/blogview_renderer.c index 7e79fc7bd..30ede0c14 100644 --- a/webcit/blogview_renderer.c +++ b/webcit/blogview_renderer.c @@ -40,9 +40,15 @@ struct blogpost { * FIXME do the needful with regard to gettext */ void blogpost_render_and_destroy(struct blogpost *bp) { - if (bp->num_msgs > 0) wc_printf("Blog post %ld
\n", bp->msgs[0]); - if (bp->num_msgs > 1) wc_printf(" %d comments
\n", bp->num_msgs - 1); - wc_printf("
\n"); + const StrBuf *Mime; + + if (bp->num_msgs > 0) { + read_message(WC->WBuf, HKEY("view_message"), bp->msgs[0], NULL, &Mime); + wc_printf("
%d comments
\n", bp->num_msgs - 1); + wc_printf("
\n"); + } + + if (bp->alloc_msgs > 0) { free(bp->msgs); }