mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-28 08:22:24 +00:00
feat: implement stale-while-revalidate for moderation lists to speed up initial load
This change optimizes the application startup by allowing the moderation system (AccessControl) to initialize immediately using cached data from localStorage if available. It triggers a background network refresh to update the lists asynchronously, preventing the UI from blocking on slow relay responses. Key changes: - Modified `js/accessControl.js` to make `ensureReady()` return immediately if hydrated from cache. - Updated `js/app.js` to use `ensureReady()` instead of the blocking `refresh()` during init. - Updated `js/ui/profileModalController.js` to conditionally show the "Fetching moderation filters…" status message only when waiting for network data.
This commit is contained in:
1 parent
023c97340b
commit
e1d43708c5