From 7a3215edaa47b0c036c4701b428c2e3c562bcdb3 Mon Sep 17 00:00:00 2001 From: Bat Date: Sun, 10 Jun 2018 17:37:02 +0100 Subject: [PATCH] Show 6 articles on the home and on profiles --- src/routes/instance.rs | 2 +- src/routes/user.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/instance.rs b/src/routes/instance.rs index f181ecf2..628105bb 100644 --- a/src/routes/instance.rs +++ b/src/routes/instance.rs @@ -15,7 +15,7 @@ use models::{ fn index(conn: DbConn, user: Option) -> Template { match Instance::get_local(&*conn) { Some(inst) => { - let recents = Post::get_recents(&*conn, 5); + let recents = Post::get_recents(&*conn, 6); Template::render("instance/index", json!({ "instance": inst, diff --git a/src/routes/user.rs b/src/routes/user.rs index 95223ff3..eab7c5e7 100644 --- a/src/routes/user.rs +++ b/src/routes/user.rs @@ -34,8 +34,8 @@ fn me(user: Option) -> Result> { #[get("/@/", rank = 2)] fn details(name: String, conn: DbConn, account: Option) -> Template { let user = User::find_by_fqn(&*conn, name).unwrap(); - let recents = Post::get_recents_for_author(&*conn, &user, 5); - let reshares = Reshare::get_recents_for_author(&*conn, &user, 5); + let recents = Post::get_recents_for_author(&*conn, &user, 6); + let reshares = Reshare::get_recents_for_author(&*conn, &user, 6); let user_id = user.id.clone(); let n_followers = user.get_followers(&*conn).len();