Lazy-load recommendation indexes

This commit is contained in:
thePR0M3TH3AN committed 2026-07-26 17:59:45 -04:00
1 parent fe976b3ab7
commit 5f439d6863
5 files changed
+104 -20

No files matched your search

+16 -12
View File
@@ -360,18 +360,22 @@ export default class ApplicationBootstrap {
onViewLogged: (detail) => app.handleFeedViewTelemetry(detail),
});
app.exploreDataService =
this.services.exploreDataService ||
new ExploreDataService({
watchHistoryService,
nostrService: app.nostrService,
getActiveActor: () =>
typeof app.pubkey === "string" && app.pubkey ? app.pubkey : "",
logger: devLogger,
});
if (app.exploreDataService && typeof app.exploreDataService.initialize === "function") {
app.exploreDataService.initialize();
}
app.exploreDataService = this.services.exploreDataService || null;
app.ensureExploreDataService = async () => {
if (!app.exploreDataService) {
app.exploreDataService = new ExploreDataService({
watchHistoryService,
nostrService: app.nostrService,
getActiveActor: () =>
typeof app.pubkey === "string" && app.pubkey ? app.pubkey : "",
logger: devLogger,
});
}
if (typeof app.exploreDataService.initialize === "function") {
await app.exploreDataService.initialize({ active: true });
}
return app.exploreDataService;
};
const playbackDependencies = {
torrentClient: this.services.torrentClient || torrentClient,