1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Desktop: Regression: Fixed check for update

This commit is contained in:
Laurent Cozic 2020-10-16 21:14:57 +01:00
parent 4309c4f8e2
commit 7e0e513051

View File

@ -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(),
{