Fix: The button for toggling the left pane visibility in the launcher was initially not visible on startup

This commit is contained in:
SiriusXT 2025-05-17 23:51:37 +08:00
parent 3cf27026b2
commit 7e64e31dfe

View File

@ -32,11 +32,9 @@ export default class LeftPaneToggleWidget extends CommandButtonWidget {
} }
refreshIcon() { refreshIcon() {
if (document.hasFocus() || this.currentLeftPaneVisible === true) {
super.refreshIcon(); super.refreshIcon();
splitService.setupLeftPaneResizer(this.currentLeftPaneVisible); splitService.setupLeftPaneResizer(this.currentLeftPaneVisible);
} }
}
entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) { entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
if (loadResults.isOptionReloaded("leftPaneVisible") && document.hasFocus()) { if (loadResults.isOptionReloaded("leftPaneVisible") && document.hasFocus()) {