Skip to content
Snippets Groups Projects
Commit c7169a53 authored by echicken's avatar echicken :chicken:
Browse files

scan_threads doesn't need offset or page size

parent 55089ece
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,13 @@ function shallow_diff(a, b) {
}
function forum_emit(evt, data) {
emit({ event: 'forum', data: JSON.stringify({ type: evt, data: data }) });
emit({
event: 'forum',
data: JSON.stringify({
type: evt,
data: data
})
});
}
function scan_groups() {
......@@ -46,8 +52,8 @@ function scan_subs(group) {
last_subs = scan;
}
function scan_threads(sub, offset, page_size) {
const scan = getThreadStats(sub, offset, page_size, !is_real_user);
function scan_threads(sub) {
const scan = getThreadStats(sub, !is_real_user);
if (!last_threads) {
forum_emit('threads', scan);
} else {
......@@ -71,7 +77,7 @@ function cycle() {
last_run = time();
if (is_real_user && Request.has_param('groups_unread')) scan_groups();
if (is_real_user && Request.has_param('subs_unread')) scan_subs(Request.get_param('subs_unread'));
if (Request.has_param('threads')) scan_threads(Request.get_param('threads'), Request.get_param('offset'), Request.get_param('page_size'));
if (Request.has_param('sub')) scan_threads(Request.get_param('sub'));
}
this;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment