Files
Signal-Desktop/ts/services/updateListener.ts
2020-02-12 13:30:58 -08:00

14 lines
439 B
TypeScript

import { ipcRenderer } from 'electron';
import { Dialogs } from '../types/Dialogs';
import { ShowUpdateDialogAction } from '../state/ducks/updates';
type UpdatesActions = {
showUpdateDialog: (x: Dialogs) => ShowUpdateDialogAction;
};
export function initializeUpdateListener(updatesActions: UpdatesActions) {
ipcRenderer.on('show-update-dialog', (_, dialogType: Dialogs) => {
updatesActions.showUpdateDialog(dialogType);
});
}