Fix for fallback update dialog
This commit is contained in:
parent
f379c72aba
commit
018dc34e47
5 changed files with 70 additions and 34 deletions
|
@ -6,8 +6,19 @@ type UpdatesActions = {
|
|||
showUpdateDialog: (x: Dialogs) => ShowUpdateDialogAction;
|
||||
};
|
||||
|
||||
export function initializeUpdateListener(updatesActions: UpdatesActions) {
|
||||
type EventsType = {
|
||||
once: (ev: string, f: () => void) => void;
|
||||
};
|
||||
|
||||
export function initializeUpdateListener(
|
||||
updatesActions: UpdatesActions,
|
||||
events: EventsType
|
||||
) {
|
||||
ipcRenderer.on('show-update-dialog', (_, dialogType: Dialogs) => {
|
||||
updatesActions.showUpdateDialog(dialogType);
|
||||
});
|
||||
|
||||
events.once('snooze-update', () => {
|
||||
updatesActions.showUpdateDialog(Dialogs.Update);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue