Skip to content

Commit

Permalink
fixed hanging renderer thread when executing inter-thread actions (#1…
Browse files Browse the repository at this point in the history
…5185)

* fixed hanging renderer thread when executing inter-thread actions
* readded changelog dialog
---------
Co-authored-by: insomnious <[email protected]>
  • Loading branch information
IDCs authored Jan 25, 2024
1 parent f0c5caa commit f2408e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/actions/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,26 @@ export function fireNotificationAction(notiId: string, notiProcess: string,

if (ipcMain !== undefined) {
ipcMain.on('fire-notification-action',
(event: Electron.Event, notiId: string, action: number) => {
(event: any, notiId: string, action: number) => {
const func = notificationActions[notiId]?.[action];
//let res = false;
let res = false;
if (func !== undefined) {
func(() => {
//res = true;
res = true;
});
}

event.preventDefault();
event.returnValue = res;
});

ipcMain.on('fire-dialog-action',
(event: Electron.Event, dialogId: string, action: string, input: any) => {
(event: any, dialogId: string, action: string, input: any) => {
const func = DialogCallbacks.instance()[dialogId];
if (func !== undefined) {
func(action, input);
delete DialogCallbacks.instance()[dialogId];
}
//event.returnValue = true;
event.returnValue = true;
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/extensions/updater/autoupdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function setupAutoUpdate(api: IExtensionApi) {
type: 'success',
message: 'Update available',
actions: [
/*{
{
title: 'Changelog',
action: () => {
api.store.dispatch(showDialog('info', `Changelog ${info.version}`, {
Expand All @@ -252,7 +252,7 @@ function setupAutoUpdate(api: IExtensionApi) {
{ label: 'Close' },
]));
},
},*/
},
{
title: 'Restart & Install',
action: () => {
Expand Down

0 comments on commit f2408e2

Please sign in to comment.