Skip to content

Node.js based forum software built for the modern web

fix: updating user bookmark when entering topic at the end from teaser

Barış Soner Uşaklıcc1c493bbf33
diff --git a/public/src/client/topic.js b/public/src/client/topic.js
index d13ce7b9f7..d249447f3a 100644
--- a/public/src/client/topic.js
+++ b/public/src/client/topic.js
@@ -142,7 +142,7 @@ define('forum/topic', [
}
const bookmark = ajaxify.data.bookmark || storage.getItem('topic:' + tid + ':bookmark');
const postIndex = ajaxify.data.postIndex;
-
+ updateUserBookmark(postIndex);
if (postIndex > 1) {
if (components.get('post/anchor', postIndex - 1).length) {
return navigator.scrollToPostIndex(postIndex - 1, true, 0);
@@ -364,7 +364,7 @@ define('forum/topic', [
socket.emit('topics.bookmark', {
tid: ajaxify.data.tid,
- index: index,
+ index: ajaxify.data.bookmark,
}, function (err) {
if (err) {
ajaxify.data.bookmark = currentBookmark;