diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarSettings.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarSettings.tsx index 29cae994..d0f91037 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarSettings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarSettings.tsx @@ -109,13 +109,6 @@ export const SidebarSettings = () => { ))} })} - - {/* Remove this after 10/21/24, this is just to give developers a heads up about the recent change */} -
- {`We recently updated Settings. To copy your old Void settings over, press Ctrl+Shift+P, `} - {`type 'Open User Settings (JSON)',`} - {` and look for 'void.'. `} -
) } diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/services.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/services.tsx index 30b9af44..9cceb8d7 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/services.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/services.tsx @@ -5,12 +5,15 @@ import { ThreadsState } from '../../../registerThreads.js' // normally to do this you'd use a useEffect that calls .onDidChangeState(), but useEffect mounts too late and misses initial state changes + let services: ReactServicesType +// even if React hasn't mounted yet, these variables are always updated to the latest state: let sidebarState: VoidSidebarState let configState: ConfigState let threadsState: ThreadsState +// React listens by adding a setState function to these: const sidebarStateListeners: Set<(s: VoidSidebarState) => void> = new Set() const configStateListeners: Set<(s: ConfigState) => void> = new Set() const threadsStateListeners: Set<(s: ThreadsState) => void> = new Set() diff --git a/src/vs/workbench/contrib/void/browser/registerConfig.ts b/src/vs/workbench/contrib/void/browser/registerConfig.ts index bb54fbee..b1e8708a 100644 --- a/src/vs/workbench/contrib/void/browser/registerConfig.ts +++ b/src/vs/workbench/contrib/void/browser/registerConfig.ts @@ -241,7 +241,7 @@ class VoidConfigStateService extends Disposable implements IVoidConfigStateServi _serviceBrand: undefined; private readonly _onDidChangeState = new Emitter(); - readonly onDidChangeState: Event = this._onDidChangeState.event; + readonly onDidChangeState: Event = this._onDidChangeState.event; // this is primarily for use in react, so react can listen + update on state changes state: ConfigState; readonly voidConfigInfo: VoidConfigInfo = voidConfigInfo; // just putting this here for simplicity, it's static though