From 0e5ae21286dec25aea220307a8f9ff1dccfd62f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 6 Apr 2023 19:18:21 -0400 Subject: [PATCH] fix: #11440, update timestamp on lastpost button --- public/src/client/topic/posts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index dfb2aa09df..bf4eb868f6 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -36,7 +36,7 @@ define('forum/topic/posts', [ Posts.modifyPostsByPrivileges(data.posts); updatePostCounts(data.posts); - + updateNavigatorLastPostTimestamp(data.posts[0]); updatePostIndices(data.posts); ajaxify.data.postcount += 1; @@ -53,6 +53,10 @@ define('forum/topic/posts', [ }); }; + function updateNavigatorLastPostTimestamp(post) { + $('.pagination-block .pagebottom .timeago').timeago('update', post.timestampISO); + } + Posts.modifyPostsByPrivileges = function (posts) { posts.forEach(function (post) { post.selfPost = !!app.user.uid && parseInt(post.uid, 10) === parseInt(app.user.uid, 10);