-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove windowManager from extension api #1323
Remove windowManager from extension api #1323
Conversation
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -16,7 +16,7 @@ import { isDevelopment } from "../common/vars"; | |||
export let tray: Tray; | |||
|
|||
// refresh icon when MacOS dark/light theme has changed | |||
nativeTheme.on("updated", () => tray?.setImage(getTrayIcon())); | |||
nativeTheme?.on("updated", () => tray?.setImage(getTrayIcon())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nativeTheme
not available in some OS-es?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that windowManager is exposed to both main/renderer this needs to be protected, nativeTheme
is undefined in renderer :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then probably better to move this binding to initTray(windowManager: WindowManager)
….com:lensapp/lens into fix/remove-window-manager-from-extension-api Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
|
||
export class LensMainExtension extends LensExtension { | ||
@observable.shallow appMenus: MenuRegistration[] = [] | ||
|
||
async navigate(location: string, frameId?: number) { | ||
await WindowManager.getInstance<WindowManager>().navigate(location, frameId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whew, nice
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This reverts commit 03b486e. Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Fixes #1320