Test code climate #1058

Closed
IGassmann wants to merge 48 commits from testCodeClimate into master
2 changed files with 23 additions and 17 deletions
Showing only changes of commit e870723a6a - Show all commits

View file

@ -35,7 +35,10 @@
} }
], ],
"linux": { "linux": {
"category": "AudioVideo, Video" "category": "AudioVideo;Video",
"desktop": {
"MimeType": "x-scheme-handler/lbry"
}
}, },
"nsis": { "nsis": {
"perMachine": true "perMachine": true

View file

@ -9,8 +9,12 @@ import lbry from 'lbry';
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { doConditionalAuthNavigate, doDaemonReady, doShowSnackBar, doAutoUpdate } from 'redux/actions/app'; import {
import { doUpdateIsNightAsync } from 'redux/actions/settings'; doConditionalAuthNavigate,
doDaemonReady,
doShowSnackBar,
doAutoUpdate,
} from 'redux/actions/app';
import { doNavigate } from 'redux/actions/navigation'; import { doNavigate } from 'redux/actions/navigation';
import { doDownloadLanguages } from 'redux/actions/settings'; import { doDownloadLanguages } from 'redux/actions/settings';
import { doUserEmailVerify } from 'redux/actions/user'; import { doUserEmailVerify } from 'redux/actions/user';
@ -20,7 +24,7 @@ import app from './app';
const { autoUpdater } = remote.require('electron-updater'); const { autoUpdater } = remote.require('electron-updater');
autoUpdater.logger = remote.require("electron-log"); autoUpdater.logger = remote.require('electron-log');
window.addEventListener('contextmenu', event => { window.addEventListener('contextmenu', event => {
contextMenu(remote.getCurrentWindow(), event.x, event.y, app.env === 'development'); contextMenu(remote.getCurrentWindow(), event.x, event.y, app.env === 'development');
@ -100,22 +104,21 @@ document.addEventListener('click', event => {
}); });
const init = () => { const init = () => {
autoUpdater.on("update-downloaded", () => { autoUpdater.on('update-downloaded', () => {
app.store.dispatch(doAutoUpdate()); app.store.dispatch(doAutoUpdate());
}); });
if (["win32", "darwin"].includes(process.platform)) { autoUpdater.on('update-available', () => {
autoUpdater.on("update-available", () => { console.log('Update available');
console.log("Update available");
}); });
autoUpdater.on("update-not-available", () => { autoUpdater.on('update-not-available', () => {
console.log("Update not available"); console.log('Update not available');
}); });
autoUpdater.on("update-downloaded", () => { autoUpdater.on('update-downloaded', () => {
console.log("Update downloaded"); console.log('Update downloaded');
app.store.dispatch(doAutoUpdate()); app.store.dispatch(doAutoUpdate());
}); });
}
app.store.dispatch(doUpdateIsNightAsync()); app.store.dispatch(doUpdateIsNightAsync());
app.store.dispatch(doDownloadLanguages()); app.store.dispatch(doDownloadLanguages());