mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-13 08:12:31 +00:00
fix(watch-history): add manual refresh and fix dynamic pulling
This commit addresses issues with the watch history not updating dynamically and adds a manual refresh mechanism. Changes: - Added a "Refresh" button to the watch history view in `views/history.html` and `js/historyView.js`. - Updated `watchHistoryService.js` to accept a `forceRefresh` option in `loadLatest`, which bypasses the cache freshness check and triggers a relay fetch. - Updated `js/feedEngine/watchHistoryFeed.js` to propagate the `forceRefresh` flag from the runtime context to the service. - Added user feedback (toast messages and logs) for "Clear Local History" and "Republish Now" actions. - Updated `tests/watch-history.test.mjs` to align with the new `fetchHistory` signature.
This commit is contained in:
1 parent
a5994f1380
commit
c322fcee14
5 files changed
+87
-18
No files matched your search
@@ -2569,9 +2569,9 @@ async function testWatchHistoryFeedHydration() {
|
||||
|
||||
// Simulate renderer fetching via feed engine
|
||||
const renderer = createWatchHistoryRenderer({
|
||||
fetchHistory: async (actorInput, { cursor = 0 } = {}) => {
|
||||
fetchHistory: async (actorInput, { cursor = 0, forceRefresh = false } = {}) => {
|
||||
const runtime = {
|
||||
watchHistory: { actor: actorInput, cursor },
|
||||
watchHistory: { actor: actorInput, cursor, forceRefresh },
|
||||
blacklistedEventIds: new Set(),
|
||||
isAuthorBlocked: () => false
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user