mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
remove bookmark alert on scroll or after 10 secs
This commit is contained in:
@@ -124,7 +124,7 @@ define('forum/topic', [
|
|||||||
if (components.get('post/anchor', postIndex).length) {
|
if (components.get('post/anchor', postIndex).length) {
|
||||||
return navigator.scrollToPostIndex(postIndex, true);
|
return navigator.scrollToPostIndex(postIndex, true);
|
||||||
}
|
}
|
||||||
} else if (bookmark && (!config.usePagination || (config.usePagination && pagination.currentPage === 1)) && ajaxify.data.postcount > 1) {
|
} else if (bookmark && (!config.usePagination || (config.usePagination && pagination.currentPage === 1)) && ajaxify.data.postcount > 10) {
|
||||||
app.alert({
|
app.alert({
|
||||||
alert_id: 'bookmark',
|
alert_id: 'bookmark',
|
||||||
message: '[[topic:bookmark_instructions]]',
|
message: '[[topic:bookmark_instructions]]',
|
||||||
@@ -137,6 +137,9 @@ define('forum/topic', [
|
|||||||
localStorage.removeItem('topic:' + tid + ':bookmark');
|
localStorage.removeItem('topic:' + tid + ':bookmark');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
setTimeout(function() {
|
||||||
|
app.removeAlert('bookmark');
|
||||||
|
}, 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,6 +187,7 @@ define('forum/topic', [
|
|||||||
} else {
|
} else {
|
||||||
components.get('navbar/title').find('span').text('').hide();
|
components.get('navbar/title').find('span').text('').hide();
|
||||||
}
|
}
|
||||||
|
app.removeAlert('bookmark');
|
||||||
}
|
}
|
||||||
|
|
||||||
Topic.calculateIndex = function(index, elementCount) {
|
Topic.calculateIndex = function(index, elementCount) {
|
||||||
|
|||||||
Reference in New Issue
Block a user