File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { Contribution } from "@posthog/di/contribution" ;
22import { BROWSER_TAB_FLAG } from "@posthog/shared/constants" ;
3- import {
4- FEATURE_FLAGS ,
5- type FeatureFlags ,
6- } from "@posthog/ui/features/feature-flags/identifiers" ;
3+ import type { FeatureFlags } from "@posthog/ui/features/feature-flags/identifiers" ;
74import { trpcClient } from "@renderer/trpc/client" ;
8- import { inject , injectable } from "inversify" ;
95
10- @injectable ( )
116export class BrowserViewContribution implements Contribution {
12- constructor (
13- @inject ( FEATURE_FLAGS ) private readonly featureFlags : FeatureFlags ,
14- ) { }
7+ constructor ( private readonly featureFlags : FeatureFlags ) { }
158
169 start ( ) : void {
1710 const sync = ( ) : void => {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { browserTabsUiModule } from "@posthog/ui/features/browser-tabs/browser-t
1616import { cloneUiModule } from "@posthog/ui/features/clone/clone.module" ;
1717import { connectivityUiModule } from "@posthog/ui/features/connectivity/connectivity.module" ;
1818import { discordPresenceUiModule } from "@posthog/ui/features/discord-presence/discordPresence.module" ;
19+ import { FEATURE_FLAGS } from "@posthog/ui/features/feature-flags/identifiers" ;
1920import { fileWatcherUiModule } from "@posthog/ui/features/file-watcher/file-watcher.module" ;
2021import { focusUiModule } from "@posthog/ui/features/focus/focus.module" ;
2122import { notificationsUiModule } from "@posthog/ui/features/notifications/notifications.module" ;
@@ -61,6 +62,8 @@ export function registerDesktopContributions(): void {
6162 }
6263
6364 container . bind ( CONTRIBUTION ) . to ( AnalyticsBootContribution ) . inSingletonScope ( ) ;
64- container . bind ( CONTRIBUTION ) . to ( BrowserViewContribution ) . inSingletonScope ( ) ;
65+ container
66+ . bind ( CONTRIBUTION )
67+ . toConstantValue ( new BrowserViewContribution ( container . get ( FEATURE_FLAGS ) ) ) ;
6568 container . bind ( CONTRIBUTION ) . to ( InboxDemoDevContribution ) . inSingletonScope ( ) ;
6669}
You can’t perform that action at this time.
0 commit comments