about summary refs log tree commit diff
path: root/src/render.rs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-14T15·15+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-14T15·15+0200
commitf10bd20276dc1271b3a17197adf53a014c5979b1 (patch)
tree41851be75309e6395dc1f2d6f11aad4255313833 /src/render.rs
parentcf64826e4eda1ee7839a9a3e9b114564b3cced92 (diff)
feat(db): Add view for ordering thread index by most recent post
This implements the classic thread ordering expected by most forum
users (i.e. the thread with the most recent post is at the top).
Diffstat (limited to 'src/render.rs')
-rw-r--r--src/render.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render.rs b/src/render.rs
index ca1fd8ac3bc9..66b3fe19c867 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -47,7 +47,7 @@ impl From<DateTime<Utc>> for FormattedDate {
 
 /// Message used to render the index page.
 pub struct IndexPage {
-    pub threads: Vec<Thread>,
+    pub threads: Vec<ThreadIndex>,
 }
 
 impl Message for IndexPage {
@@ -69,7 +69,7 @@ impl Handler<IndexPage> for Renderer {
         let threads: Vec<IndexThread> = msg.threads
             .into_iter()
             .map(|thread| IndexThread {
-                id: thread.id,
+                id: thread.thread_id,
                 title: escape_html(&thread.title),
                 posted: thread.posted.into(),
                 author_name: thread.author_name,