Code cleanup, update eslint from webapp, add ts-prune (#1884)
This commit is contained in:
@@ -165,7 +165,7 @@ export class MattermostView extends EventEmitter {
|
||||
};
|
||||
}
|
||||
|
||||
loadRetry = (loadURL: string, err: any) => {
|
||||
loadRetry = (loadURL: string, err: Error) => {
|
||||
this.retryLoad = setTimeout(this.retry(loadURL), RELOAD_INTERVAL);
|
||||
WindowManager.sendToRenderer(LOAD_RETRY, this.tab.name, Date.now() + RELOAD_INTERVAL, err.toString(), loadURL.toString());
|
||||
log.info(`[${Util.shorten(this.tab.name)}] failed loading ${loadURL}: ${err}, retrying in ${RELOAD_INTERVAL / SECOND} seconds`);
|
||||
@@ -211,7 +211,6 @@ export class MattermostView extends EventEmitter {
|
||||
hide = () => this.show(false);
|
||||
|
||||
setBounds = (boundaries: Electron.Rectangle) => {
|
||||
// todo: review this, as it might not work properly with devtools/minimizing/resizing
|
||||
this.view.setBounds(boundaries);
|
||||
}
|
||||
|
||||
|
@@ -446,7 +446,7 @@ export class ViewManager {
|
||||
}
|
||||
};
|
||||
|
||||
sendToAllViews = (channel: string, ...args: any[]) => {
|
||||
sendToAllViews = (channel: string, ...args: unknown[]) => {
|
||||
this.views.forEach((view) => view.view.webContents.send(channel, ...args));
|
||||
}
|
||||
}
|
||||
|
@@ -126,7 +126,7 @@ const generateNewWindowListener = (getServersFunction: () => TeamWithTabs[], spe
|
||||
}
|
||||
|
||||
// Public download links case
|
||||
// TODO: We might be handling different types differently in the future, for now
|
||||
// We might be handling different types differently in the future, for now
|
||||
// we are going to mimic the browser and just pop a new browser window for public links
|
||||
if (parsedURL.pathname.match(/^(\/api\/v[3-4]\/public)*\/files\//)) {
|
||||
shell.openExternal(details.url);
|
||||
@@ -218,7 +218,7 @@ export const addWebContentsEventListeners = (mmview: MattermostView, getServersF
|
||||
}
|
||||
|
||||
const willNavigate = generateWillNavigate(getServersFunction);
|
||||
contents.on('will-navigate', willNavigate as (e: Event, u: string) => void); // TODO: Electron types don't include sender for some reason
|
||||
contents.on('will-navigate', willNavigate as (e: Event, u: string) => void); // Electron types don't include sender for some reason
|
||||
|
||||
// handle custom login requests (oath, saml):
|
||||
// 1. are we navigating to a supported local custom login path from the `/login` page?
|
||||
|
Reference in New Issue
Block a user