Skip to content

Commit

Permalink
fix: updating user bookmark when entering topic at the end from teaser
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Apr 6, 2023
1 parent a3ae0c5 commit cc1c493
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/src/client/topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cc1c493

Please sign in to comment.