v1.18.x
barisusakli 9 years ago
parent accd9b6e2e
commit ff9b2bad49

@ -143,7 +143,7 @@ define('forum/topic', [
if (components.get('post/anchor', postIndex).length) {
return navigator.scrollToPostIndex(postIndex, true);
}
} else if (bookmark && (!config.usePagination || (config.usePagination && ajaxify.data.pagination.currentPage === 1)) && ajaxify.data.postcount > 5) {
} else if (bookmark && (!config.usePagination || (config.usePagination && ajaxify.data.pagination.currentPage === 1)) && ajaxify.data.postcount > ajaxify.data.bookmarkThreshold) {
navigator.update(0);
app.alert({
alert_id: 'bookmark',
@ -280,7 +280,7 @@ define('forum/topic', [
var bookmarkKey = 'topic:' + ajaxify.data.tid + ':bookmark';
var currentBookmark = ajaxify.data.bookmark || localStorage.getItem(bookmarkKey);
if (ajaxify.data.postcount > 5 && (!currentBookmark || parseInt(index, 10) > parseInt(currentBookmark, 10))) {
if (ajaxify.data.postcount > ajaxify.data.bookmarkThreshold && (!currentBookmark || parseInt(index, 10) > parseInt(currentBookmark, 10))) {
if (app.user.uid) {
socket.emit('topics.bookmark', {
'tid': ajaxify.data.tid,

@ -261,6 +261,7 @@ topicsController.get = function(req, res, callback) {
data['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1;
data['downvote:disabled'] = parseInt(meta.config['downvote:disabled'], 10) === 1;
data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1;
data.bookmarkThreshold = parseInt(meta.config.bookmarkThreshold, 10) || 5;
data.scrollToMyPost = settings.scrollToMyPost;
data.rssFeedUrl = nconf.get('relative_path') + '/topic/' + data.tid + '.rss';
data.pagination = pagination.create(currentPage, pageCount);

@ -100,6 +100,10 @@
<label for="unreadCutoff">Unread cutoff days</label>
<input id="unreadCutoff" type="text" class="form-control" value="2" data-field="unreadCutoff">
</div>
<div class="form-group">
<label for="bookmarkthreshold">Minimum posts in topic before tracking last read</label>
<input id="bookmarkthreshold" type="text" class="form-control" value="5" data-field="bookmarkThreshold">
</div>
</form>
</div>
</div>

Loading…
Cancel
Save