client, server: merge nearby pool posts into regular post serialization

Can still be cleaned up some more.
Need to compare speed of the get_around query vs nearby pool posts.
This commit is contained in:
Eva
2025-04-03 01:39:09 +02:00
parent 7708b4e5a3
commit 3875ec173f
8 changed files with 67 additions and 81 deletions

View File

@ -16,9 +16,9 @@ class PoolNavigatorControl extends events.EventTarget {
views.replaceContent(
this._hostNode,
template({
pool: poolPostNearby.pool,
parameters: { query: `pool:${poolPostNearby.pool.id}` },
linkClass: misc.makeCssName(poolPostNearby.pool.category, "pool"),
pool: poolPostNearby,
parameters: { query: `pool:${poolPostNearby.id}` },
linkClass: misc.makeCssName(poolPostNearby.category, "pool"),
canViewPosts: api.hasPrivilege("posts:view"),
canViewPools: api.hasPrivilege("pools:view"),
firstPost: poolPostNearby.firstPost,