(data: AppData)
| 23 | dashboarShortcut?: string; |
| 24 | |
| 25 | deserialize(data: AppData) { |
| 26 | if (typeof data != 'object') // accepts empty data |
| 27 | data = {}; |
| 28 | if (!data.hideTrayIcon) |
| 29 | this.tray = new AppTray(); |
| 30 | if (process.platform == 'darwin' && data.hideDockIcon) |
| 31 | this.setDockIconVisible(false); |
| 32 | if (data.notFirstTime) |
| 33 | this.firstTimeStart = false; |
| 34 | if (data.dashboarShortcut) |
| 35 | this.setDashboardShortcut(data.dashboarShortcut); |
| 36 | // There is no config for menuBar but we should only create it after config |
| 37 | // is read. |
| 38 | if (process.platform == 'darwin') |
| 39 | this.menuBar = new AppMenuBar(); |
| 40 | } |
| 41 | |
| 42 | serialize() { |
| 43 | const data: AppData = {notFirstTime: true}; |
nothing calls this directly
no test coverage detected