()
| 24 | } |
| 25 | |
| 26 | async restartApp(): Promise<{ supported: true } | { supported: false; message: string }> { |
| 27 | const restartAppHandler = this.restartAppHandler; |
| 28 | if (!restartAppHandler) { |
| 29 | const message = "Restart is only available in the desktop app."; |
| 30 | log.warn("WindowService: restartApp requested without a registered restart handler"); |
| 31 | return { supported: false, message }; |
| 32 | } |
| 33 | |
| 34 | try { |
| 35 | await restartAppHandler(); |
| 36 | return { supported: true }; |
| 37 | } catch (error) { |
| 38 | log.error("WindowService: restartApp failed", error); |
| 39 | throw error; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | focusMainWindow(): void { |
| 44 | const mainWindow = this.mainWindow; |
no outgoing calls
no test coverage detected