refactor: keep ToolApp as single root view

This commit is contained in:
7015725
2026-05-13 07:27:39 +08:00
parent 2a53c872eb
commit 080cb9abf7
6 changed files with 129 additions and 17 deletions

View File

@@ -183,10 +183,17 @@ FloatBallAppWM.prototype.hideViewerPanel = function() {
if (!this.state.addedViewer) return;
if (!this.state.viewerPanel) return;
var oldViewerType = String(this.state.viewerPanelType || "");
this.safeRemoveView(this.state.viewerPanel, "viewerPanel");
this.state.viewerPanel = null;
this.state.viewerPanelLp = null;
this.state.viewerPanelType = null;
if (oldViewerType === "tool_app") {
this.state.toolAppRoot = null;
this.state.toolAppContentHost = null;
this.state.toolAppTitleView = null;
this.state.toolAppBackButton = null;
}
this.state.addedViewer = false;
this.hideMask();