Skip to content
Permalink
Browse files

fix: also fix updating bookmark if sorting is newest_to_oldest

  • Loading branch information
barisusakli committed Feb 27, 2020
1 parent 32ada7c commit 6e5de39ba05984a2791e01fffdb2a48a8b4924c5
Showing with 3 additions and 0 deletions.
  1. +3 −0 public/src/client/topic.js
@@ -241,6 +241,9 @@ define('forum/topic', [
function updateUserBookmark(index) {
var bookmarkKey = 'topic:' + ajaxify.data.tid + ':bookmark';
var currentBookmark = ajaxify.data.bookmark || storage.getItem(bookmarkKey);
if (config.topicPostSort === 'newest_to_oldest') {
index = Math.max(1, ajaxify.data.postcount - index + 2);
}

if (ajaxify.data.postcount > ajaxify.data.bookmarkThreshold && (!currentBookmark || parseInt(index, 10) > parseInt(currentBookmark, 10) || ajaxify.data.postcount < parseInt(currentBookmark, 10))) {
if (app.user.uid) {

0 comments on commit 6e5de39

Please sign in to comment.
You can’t perform that action at this time.