remove electron-log from preload (#1673)

fix lint
This commit is contained in:
Guillermo Vayá
2021-07-28 15:51:55 +02:00
committed by GitHub
parent d859e95c5c
commit 2229ed3e84

View File

@@ -7,21 +7,22 @@
/* eslint-disable no-magic-numbers */
import {ipcRenderer, webFrame} from 'electron';
import log from 'electron-log';
// I've filed an issue in electron-log https://github.com/megahertz/electron-log/issues/267
// we'll be able to use it again if there is a workaround for the 'os' import
//import log from 'electron-log';
import {NOTIFY_MENTION, IS_UNREAD, UNREAD_RESULT, SESSION_EXPIRED, SET_VIEW_NAME, REACT_APP_INITIALIZED, USER_ACTIVITY_UPDATE, CLOSE_TEAMS_DROPDOWN} from 'common/communication';
const UNREAD_COUNT_INTERVAL = 1000;
const CLEAR_CACHE_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours
Reflect.deleteProperty(global.Buffer); // http://electron.atom.io/docs/tutorial/security/#buffer-global
let appVersion;
let appName;
let sessionExpired;
let viewName;
log.info('Initializing preload');
console.log('Preload initialized');
ipcRenderer.invoke('get-app-version').then(({name, version}) => {
appVersion = version;