mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
feeds: fix Most Zapped eternal spinner — missing app-level delegates
app.js delegates each feedCoordinator method explicitly (the coordinator is lazy), and registerMostZappedFeed / loadMostZappedVideos were never added. Bootstrap's `typeof app.registerMostZappedFeed === "function"` guard was silently false (feed never registered) and the view registry's loadMostZappedVideos call no-oped, so the view's spinner was never replaced. Reproduced in a Playwright harness (spinner before, 158 videos rendered after adding the delegates). Also exposes window.__bitvidZapTotals (snapshot/request/flush) for diagnosing zap-badge visibility in live sessions. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
cbe894969d
commit
941580f227
2 files changed
+16
No files matched your search
@@ -4373,6 +4373,11 @@ class Application {
|
||||
return this._feed.registerTrendingFeed(...args);
|
||||
}
|
||||
|
||||
registerMostZappedFeed(...args) {
|
||||
this._initCoordinators();
|
||||
return this._feed.registerMostZappedFeed(...args);
|
||||
}
|
||||
|
||||
registerSubscriptionsFeed(...args) {
|
||||
this._initCoordinators();
|
||||
return this._feed.registerSubscriptionsFeed(...args);
|
||||
@@ -4476,6 +4481,11 @@ class Application {
|
||||
return this._feed.loadTrendingVideos(...args);
|
||||
}
|
||||
|
||||
async loadMostZappedVideos(...args) {
|
||||
this._initCoordinators();
|
||||
return this._feed.loadMostZappedVideos(...args);
|
||||
}
|
||||
|
||||
async loadOlderVideos(...args) {
|
||||
this._initCoordinators();
|
||||
return this._feed.loadOlderVideos(...args);
|
||||
|
||||
@@ -279,3 +279,9 @@ export function onZapTotalsChanged(listener) {
|
||||
|
||||
// The singleton store itself — exposes flush() for tests.
|
||||
export default store;
|
||||
|
||||
// Console debug handle: window.__bitvidZapTotals.getSnapshot(["a","30078:…"]),
|
||||
// .request(pointer), .flush() — for diagnosing why a badge is (not) showing.
|
||||
if (typeof window !== "undefined") {
|
||||
window.__bitvidZapTotals = store;
|
||||
}
|
||||
Reference in new issue
Block a user