MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / notifyUpdateInstalled

Function notifyUpdateInstalled

runtime/src/js/pgadmin.js:455–479  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

453
454// Helper to notify update installed after restart
455function notifyUpdateInstalled() {
456 if (configStore.get('update_installed')) {
457 try {
458 // Notify renderer
459 if (pgAdminMainScreen) {
460 misc.writeServerLog('[Auto-Updater]: Update installed successfully.');
461 setTimeout(() => {
462 pgAdminMainScreen.webContents.send('notifyAppAutoUpdate', {update_installed: true});
463 }, 10000);
464 } else {
465 // If main screen not ready, wait and send after it's created
466 app.once('browser-window-created', (_event, _window) => {
467 misc.writeServerLog('[Auto-Updater]: Update installed successfully.');
468 setTimeout(() => {
469 pgAdminMainScreen.webContents.send('notifyAppAutoUpdate', {update_installed: true});
470 }, 10000);
471 });
472 }
473 // Reset the flag
474 configStore.set('update_installed', false);
475 } catch (err) {
476 misc.writeServerLog(`[Auto-Updater]: ${err}`);
477 }
478 }
479}
480
481// setup preload events.
482ipcMain.handle('showOpenDialog', (e, options) => dialog.showOpenDialog(BrowserWindow.fromWebContents(e.sender), options));

Callers 1

launchPgAdminWindowFunction · 0.85

Calls 4

sendMethod · 0.80
onceMethod · 0.80
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected