Log undefined menu models and action groups. Fix null errors for workspaces and update array property accessors for services. (#583)
* Handle null values for actionGroup. * Add logs * more logs * Fix property accessors and workspace null errors.
This commit is contained in:
@@ -24,12 +24,12 @@ const focusedClient = (focusedClient: AstalHyprland.Client): void => {
|
||||
export const initializeAutoHide = (): void => {
|
||||
Variable.derive([bind(autoHide), bind(forceUpdater), bind(hyprlandService, 'workspaces')], (shouldAutohide) => {
|
||||
if (shouldAutohide === 'never') {
|
||||
hyprlandService.monitors.forEach((monitor) => {
|
||||
hyprlandService.get_monitors().forEach((monitor) => {
|
||||
App.get_window(`bar-${monitor.id}`)?.set_visible(true);
|
||||
});
|
||||
}
|
||||
|
||||
hyprlandService.workspaces.map((workspace) => {
|
||||
hyprlandService.get_workspaces().map((workspace) => {
|
||||
if (autoHide.get() === 'single-window') {
|
||||
App.get_window(`bar-${workspace.monitor.id}`)?.set_visible(workspace.get_clients().length !== 1);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ export const initializeAutoHide = (): void => {
|
||||
|
||||
Variable.derive([bind(autoHide)], (shouldAutohide) => {
|
||||
if (shouldAutohide === 'fullscreen') {
|
||||
hyprlandService.workspaces.forEach((workspace) => {
|
||||
hyprlandService.get_workspaces().forEach((workspace) => {
|
||||
App.get_window(`bar-${workspace.monitor.id}`)?.set_visible(!workspace.hasFullscreen);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user