Refactoring
This commit is contained in:
@@ -13,6 +13,8 @@ import * as serviceWorker from './serviceWorker';
|
|||||||
const Constants = require('./constants');
|
const Constants = require('./constants');
|
||||||
|
|
||||||
const ipcRenderer = getIPCRenderer();
|
const ipcRenderer = getIPCRenderer();
|
||||||
|
let store;
|
||||||
|
|
||||||
if (ipcRenderer) {
|
if (ipcRenderer) {
|
||||||
ipcRenderer.on(Constants.IPC_Get_Platform_Reply, (event, arg) => {
|
ipcRenderer.on(Constants.IPC_Get_Platform_Reply, (event, arg) => {
|
||||||
if (arg.Platform === 'linux') {
|
if (arg.Platform === 'linux') {
|
||||||
@@ -20,7 +22,7 @@ if (ipcRenderer) {
|
|||||||
root.style.setProperty('--default_font_size', '15px');
|
root.style.setProperty('--default_font_size', '15px');
|
||||||
}
|
}
|
||||||
|
|
||||||
const store = createAppStore(arg.Platform, arg.AppPlatform, packageJson.version);
|
store = createAppStore(arg.Platform, arg.AppPlatform, packageJson.version);
|
||||||
ipcRenderer.on(Constants.IPC_Get_State_Reply, (event, arg) => {
|
ipcRenderer.on(Constants.IPC_Get_State_Reply, (event, arg) => {
|
||||||
if (arg.data) {
|
if (arg.data) {
|
||||||
store.dispatch(setActiveRelease(arg.data.Release, arg.data.Version));
|
store.dispatch(setActiveRelease(arg.data.Release, arg.data.Version));
|
||||||
|
|||||||
Reference in New Issue
Block a user