ari/DynamicPageLoads #2

Merged
astra merged 6 commits from ari/DynamicPageLoads into main 2025-04-22 03:14:38 +00:00
2 changed files with 12 additions and 8 deletions
Showing only changes of commit dc3039ef8b - Show all commits

View file

@ -9,14 +9,17 @@ export class Config {
static readonly PDS_URL: string = "https://pds.witchcraft.systems"; static readonly PDS_URL: string = "https://pds.witchcraft.systems";
/** /**
* The base URL of the frontend service for linking to replies * The base URL of the frontend service for linking to replies/quotes/accounts etc.
* @default "https://deer.social" * @default "https://deer.social"
*/ */
static readonly FRONTEND_URL: string = "https://deer.social"; static readonly FRONTEND_URL: string = "https://deer.social";
/** /**
* Maximum number of posts to show in the feed (across all users) * Maximum number of posts to fetch from the PDS per request
* @default 100 * Should be around 20 for about 10 users on the pds
* The more users you have, the lower the number should be
* since sorting is slow and is done on the frontend
* @default 20
*/ */
static readonly MAX_POSTS: number = 20; static readonly MAX_POSTS: number = 20;
@ -27,9 +30,9 @@ export class Config {
static readonly FOOTER_TEXT: string = static readonly FOOTER_TEXT: string =
"Astrally projected from <a href='https://witchcraft.systems' target='_blank'>witchcraft.systems</a>"; "Astrally projected from <a href='https://witchcraft.systems' target='_blank'>witchcraft.systems</a>";
/** /**
* Whether to show the posts that are in the future * Whether to show the posts that are in the future
* @default false * @default false
*/ */
static readonly SHOW_FUTURE_POSTS: boolean = false; static readonly SHOW_FUTURE_POSTS: boolean = false;
} }

View file

@ -240,6 +240,7 @@ const filterPostsByDate = (posts: PostsAcc[], cutoffDate: Date) => {
}); });
return filteredPosts; return filteredPosts;
}; };
// nightmare function. However it works so I am not touching it
const getNextPosts = async () => { const getNextPosts = async () => {
if (!accountsMetadata.length) { if (!accountsMetadata.length) {
accountsMetadata = await getAllMetadataFromPds(); accountsMetadata = await getAllMetadataFromPds();