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

scan_threads doesn't need offset or page size

parent b0f8932a
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -21,7 +21,13 @@ function shallow_diff(a, b) { ...@@ -21,7 +21,13 @@ function shallow_diff(a, b) {
} }
function forum_emit(evt, data) { 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() { function scan_groups() {
...@@ -46,8 +52,8 @@ function scan_subs(group) { ...@@ -46,8 +52,8 @@ function scan_subs(group) {
last_subs = scan; last_subs = scan;
} }
function scan_threads(sub, offset, page_size) { function scan_threads(sub) {
const scan = getThreadStats(sub, offset, page_size, !is_real_user); const scan = getThreadStats(sub, !is_real_user);
if (!last_threads) { if (!last_threads) {
forum_emit('threads', scan); forum_emit('threads', scan);
} else { } else {
...@@ -71,7 +77,7 @@ function cycle() { ...@@ -71,7 +77,7 @@ function cycle() {
last_run = time(); last_run = time();
if (is_real_user && Request.has_param('groups_unread')) scan_groups(); 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 (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; this;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment