mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: updating user bookmark when entering topic at the end from teaser
This commit is contained in:
@@ -142,7 +142,7 @@ define('forum/topic', [
|
|||||||
}
|
}
|
||||||
const bookmark = ajaxify.data.bookmark || storage.getItem('topic:' + tid + ':bookmark');
|
const bookmark = ajaxify.data.bookmark || storage.getItem('topic:' + tid + ':bookmark');
|
||||||
const postIndex = ajaxify.data.postIndex;
|
const postIndex = ajaxify.data.postIndex;
|
||||||
|
updateUserBookmark(postIndex);
|
||||||
if (postIndex > 1) {
|
if (postIndex > 1) {
|
||||||
if (components.get('post/anchor', postIndex - 1).length) {
|
if (components.get('post/anchor', postIndex - 1).length) {
|
||||||
return navigator.scrollToPostIndex(postIndex - 1, true, 0);
|
return navigator.scrollToPostIndex(postIndex - 1, true, 0);
|
||||||
@@ -364,7 +364,7 @@ define('forum/topic', [
|
|||||||
|
|
||||||
socket.emit('topics.bookmark', {
|
socket.emit('topics.bookmark', {
|
||||||
tid: ajaxify.data.tid,
|
tid: ajaxify.data.tid,
|
||||||
index: index,
|
index: ajaxify.data.bookmark,
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
ajaxify.data.bookmark = currentBookmark;
|
ajaxify.data.bookmark = currentBookmark;
|
||||||
|
|||||||
Reference in New Issue
Block a user