MCPcopy Create free account
hub / github.com/chieapp/chie / deserialize

Method deserialize

src/controller/app.ts:25–40  ·  view source on GitHub ↗
(data: AppData)

Source from the content-addressed store, hash-verified

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};

Callers

nothing calls this directly

Calls 2

setDockIconVisibleMethod · 0.95
setDashboardShortcutMethod · 0.95

Tested by

no test coverage detected