Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
fix(main): fix question window result check
Browse files Browse the repository at this point in the history
  • Loading branch information
donskov committed Oct 1, 2020
1 parent c0e3fe9 commit bdedcf5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/ipc_messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const initServerEvents = (server: any) => {
id: 'question.2key.remove',
result: 0,
},
async (result) => {
if (result) {
async (params) => {
if (params.result) {
logger.info(`Removing 2key session key ${arg}`);

await ServerStorage.removeIdentity(server, arg);
Expand Down
4 changes: 2 additions & 2 deletions src/main/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class Updater extends EventEmitter {
showAgain: true,
showAgainValue: false,
},
(result) => {
if (result) {
(params) => {
if (params.result) {
// yes
logger.info(`User agreed to download new version ${update.version}`);

Expand Down
4 changes: 2 additions & 2 deletions src/main/windows/windows_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class WindowsController {
// eslint-disable-next-line class-methods-use-this
showQuestionWindow(
params: IQuestionWindowParams,
onClosed: (result: number) => void,
onClosed: (params: IQuestionWindowParams) => void,
parent?: ElectronWindow,
) {
if (
Expand Down Expand Up @@ -245,7 +245,7 @@ class WindowsController {
onClosed: () => {
DialogsStorage.onDialogClose(browserWindow.window);

onClosed(params.result);
onClosed(browserWindow.window.params as IQuestionWindowParams);
},
});
}
Expand Down

0 comments on commit bdedcf5

Please sign in to comment.