Skip to content

Commit

Permalink
[PM-13312] Task scheduler loses event callback reference when popout …
Browse files Browse the repository at this point in the history
…opens (#11492)

* [PM-13312] Task scheduler loses event callback reference when popout opens

* [PM-13312] Task scheduler loses event callback reference when popout opens
  • Loading branch information
cagonzalezcs authored Oct 10, 2024
1 parent 14d71e7 commit c221efd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/browser/src/popup/services/services.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,14 @@ const safeProviders: SafeProvider[] = [
}),
safeProvider({
provide: ForegroundTaskSchedulerService,
useFactory: getBgService<ForegroundTaskSchedulerService>("taskSchedulerService"),
deps: [],
useFactory: (logService: LogService, stateProvider: StateProvider) => {
if (needsBackgroundInit) {
return getBgService<ForegroundTaskSchedulerService>("taskSchedulerService")();
}

return new ForegroundTaskSchedulerService(logService, stateProvider);
},
deps: [LogService, StateProvider],
}),
safeProvider({
provide: AnonLayoutWrapperDataService,
Expand Down

0 comments on commit c221efd

Please sign in to comment.