()
| 157 | |
| 158 | // 更新视图布局(使用 LayoutManager) |
| 159 | private async updateViewLayout() { |
| 160 | if (this.setupResult) { |
| 161 | this.setupResult.layoutManager.updateState({ |
| 162 | isDraggedToMainView: this.state.isDraggedToMainView, |
| 163 | isFlashcardMode: this.state.isFlashcardMode, |
| 164 | isShowingFileList: this.state.isShowingFileList |
| 165 | }); |
| 166 | await this.setupResult.layoutManager.updateViewLayout(); |
| 167 | |
| 168 | // 同步设备信息(使用 DeviceManager) |
| 169 | const deviceInfo = this.deviceManager!.getDeviceInfo(); |
| 170 | this.state.isMobileView = deviceInfo.isMobile; |
| 171 | this.state.isSmallScreen = deviceInfo.isSmallScreen; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // 在 onunload 方法中确保清理 |
| 176 | onunload() { |
no test coverage detected