fix(core): persist right sidebar open state correctly for desktop (#12953)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Refactor**
* Improved the method for updating the right sidebar's open state to
enhance maintainability. No visible changes to end-user functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Cats Juice
2025-06-27 17:57:30 +08:00
committed by GitHub
parent dc55518c5b
commit ad306edcf1

View File

@@ -80,7 +80,7 @@ export class DesktopStateSynchronizer extends Service {
this.electronApi.events.ui.onToggleRightSidebar(tabId => {
if (tabId === appInfo?.viewId) {
workbench.sidebarOpen$.next(!workbench.sidebarOpen$.value);
workbench.setSidebarOpen(!workbench.sidebarOpen$.value);
}
});