Skip to content

Node.js based forum software built for the modern web

fix: #11440, update timestamp on lastpost button

Barış Soner Uşaklı0e5ae21286de
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);