From 7e0e5130519edc3ca7bb921cea2c21e9a9a5323a Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 16 Oct 2020 21:14:57 +0100 Subject: [PATCH] Desktop: Regression: Fixed check for update --- ElectronClient/gui/MenuBar.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ElectronClient/gui/MenuBar.tsx b/ElectronClient/gui/MenuBar.tsx index bf99b62ab..9ec33d6df 100644 --- a/ElectronClient/gui/MenuBar.tsx +++ b/ElectronClient/gui/MenuBar.tsx @@ -251,7 +251,7 @@ function useMenu(props:Props) { exportItems.push({ label: module.fullLabel(), click: async () => { - await InteropServiceHelper.export(props.dispatch.bind(this), module); + await InteropServiceHelper.export((action:any) => props.dispatch(action), module); }, }); } @@ -322,7 +322,7 @@ function useMenu(props:Props) { click: async () => { const templates = await TemplateUtils.loadTemplates(Setting.value('templateDir')); - this.store().dispatch({ + props.dispatch({ type: 'TEMPLATE_UPDATE_ALL', templates: templates, }); @@ -358,8 +358,8 @@ function useMenu(props:Props) { } toolsItems = toolsItems.concat(toolsItemsAll); - function _checkForUpdates(ctx:any) { - bridge().checkForUpdates(false, bridge().window(), ctx.checkForUpdateLoggerPath(), { includePreReleases: Setting.value('autoUpdate.includePreReleases') }); + function _checkForUpdates() { + bridge().checkForUpdates(false, bridge().window(), `${Setting.value('profileDir')}/log-autoupdater.txt`, { includePreReleases: Setting.value('autoUpdate.includePreReleases') }); } function _showAbout() { @@ -405,7 +405,7 @@ function useMenu(props:Props) { }, { label: _('Check for updates...'), visible: shim.isMac() ? true : false, - click: () => _checkForUpdates(this), + click: () => _checkForUpdates(), }, { type: 'separator', visible: shim.isMac() ? true : false, @@ -638,7 +638,7 @@ function useMenu(props:Props) { }, { label: _('Check for updates...'), visible: shim.isMac() ? false : true, - click: () => _checkForUpdates(this), + click: () => _checkForUpdates(), }, separator(), {