()
| 271 | } |
| 272 | |
| 273 | watchRunModeChange () { |
| 274 | const { userConfig } = this.configManager |
| 275 | const key = 'run-mode' |
| 276 | this.configListeners[key] = userConfig.onDidChange(key, async (newValue, oldValue) => { |
| 277 | logger.info(`[Motrix] detected ${key} value change event:`, newValue, oldValue) |
| 278 | this.trayManager.handleRunModeChange(newValue) |
| 279 | |
| 280 | if (newValue !== APP_RUN_MODE.TRAY) { |
| 281 | this.dockManager.show() |
| 282 | } else { |
| 283 | this.dockManager.hide() |
| 284 | // Hiding the dock icon will trigger the entire app to hide. |
| 285 | this.show() |
| 286 | } |
| 287 | }) |
| 288 | } |
| 289 | |
| 290 | watchShowProgressBarChange () { |
| 291 | const { userConfig } = this.configManager |
no test coverage detected