Fix super in arrow funcs

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-05-26 10:04:49 +01:00
parent b4284b4c68
commit 3ad3c3ca0a
3 changed files with 15 additions and 8 deletions

View file

@ -388,12 +388,12 @@ export default class ElectronPlatform extends VectorBasePlatform {
return Boolean(feedUrl); return Boolean(feedUrl);
} }
startUpdateCheck = () => { startUpdateCheck() {
if (this.showUpdateCheck) return; if (this.showUpdateCheck) return;
super.startUpdateCheck(); super.startUpdateCheck();
ipcRenderer.send('check_updates'); ipcRenderer.send('check_updates');
}; }
installUpdate() { installUpdate() {
// IPC to the main process to install the update, since quitAndInstall // IPC to the main process to install the update, since quitAndInstall

View file

@ -39,6 +39,13 @@ export default abstract class VectorBasePlatform extends BasePlatform {
protected showUpdateCheck: boolean = false; protected showUpdateCheck: boolean = false;
protected _favicon: Favicon; protected _favicon: Favicon;
constructor() {
super();
this.startUpdateCheck = this.startUpdateCheck.bind(this);
this.stopUpdateCheck = this.stopUpdateCheck.bind(this);
}
async getConfig(): Promise<{}> { async getConfig(): Promise<{}> {
return getVectorConfig(); return getVectorConfig();
} }
@ -96,21 +103,21 @@ export default abstract class VectorBasePlatform extends BasePlatform {
return false; return false;
} }
startUpdateCheck = () => { startUpdateCheck() {
this.showUpdateCheck = true; this.showUpdateCheck = true;
dis.dispatch({ dis.dispatch({
action: 'check_updates', action: 'check_updates',
value: { status: updateCheckStatusEnum.CHECKING }, value: { status: updateCheckStatusEnum.CHECKING },
}); });
}; }
stopUpdateCheck = () => { stopUpdateCheck() {
this.showUpdateCheck = false; this.showUpdateCheck = false;
dis.dispatch({ dis.dispatch({
action: 'check_updates', action: 'check_updates',
value: false, value: false,
}); });
}; }
getUpdateCheckStatusEnum() { getUpdateCheckStatusEnum() {
return updateCheckStatusEnum; return updateCheckStatusEnum;

View file

@ -154,7 +154,7 @@ export default class WebPlatform extends VectorBasePlatform {
}); });
}; };
startUpdateCheck = () => { startUpdateCheck() {
if (this.showUpdateCheck) return; if (this.showUpdateCheck) return;
super.startUpdateCheck(); super.startUpdateCheck();
this.pollForUpdate().then((updateState) => { this.pollForUpdate().then((updateState) => {
@ -165,7 +165,7 @@ export default class WebPlatform extends VectorBasePlatform {
value: updateState, value: updateState,
}); });
}); });
}; }
installUpdate() { installUpdate() {
window.location.reload(true); window.location.reload(true);