e621: more efficient retrieval of missing posts in pools
This commit is contained in:
parent
daa392a48c
commit
ba03f1dd5a
1 changed files with 2 additions and 2 deletions
|
@ -57,9 +57,9 @@
|
|||
|
||||
// on pool view pages, re-add posts blocked by global blacklist
|
||||
const { post_ids } = await make_request(`/pools/${match[1]}.json`);
|
||||
const all_posts = await find_all_posts(`pool:${match[1]}`);
|
||||
const all_blocked_posts = await find_all_posts(`pool:${match[1]} young -rating:s`);
|
||||
const page = +url_search_params.get('page') || 1;
|
||||
const posts = post_ids.slice((page - 1) * 75, page * 75).map(post_id => all_posts.find(({ id }) => id === post_id));
|
||||
const posts = post_ids.slice((page - 1) * 75, page * 75).map(post_id => all_blocked_posts.find(({ id }) => id === post_id) || { id: post_id });
|
||||
augment_results(document.querySelector('#posts-container'), posts, { pool_id: match[1] });
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue