MCPcopy Index your code
hub / github.com/gitify-app/gitify / initializeAppLifecycle

Function initializeAppLifecycle

src/main/lifecycle/startup.ts:18–36  ·  view source on GitHub ↗
(
  mb: Menubar,
  contextMenu: Electron.Menu,
  protocol: string,
)

Source from the content-addressed store, hash-verified

16 * @param protocol - The custom protocol string (e.g. 'gitify' or 'gitify-dev').
17 */
18export function initializeAppLifecycle(
19 mb: Menubar,
20 contextMenu: Electron.Menu,
21 protocol: string,
22): void {
23 mb.on('ready', () => {
24 mb.app.setAppUserModelId(APPLICATION.ID);
25
26 mb.tray.setToolTip(APPLICATION.NAME);
27
28 mb.tray.setIgnoreDoubleClickEvents(true);
29
30 mb.tray.on('right-click', (_event, bounds) => {
31 mb.tray.popUpContextMenu(contextMenu, { x: bounds.x, y: bounds.y });
32 });
33 });
34
35 preventSecondInstance(mb, protocol);
36}
37
38/**
39 * Handle a gitify:// protocol URL by forwarding it to the renderer process

Callers 2

index.tsFile · 0.90
startup.test.tsFile · 0.90

Calls 1

preventSecondInstanceFunction · 0.85

Tested by

no test coverage detected