aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-05-10 11:42:47 +0530
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-05-12 05:09:03 +0530
commit49be66ce0cf9391487451d1e0e3e63bc689300c5 (patch)
treee86227b3a9f7ee1ce2ac33ff9640426975d0a230
parentMethod reuse (#1379) (diff)
downloadferdium-app-49be66ce0cf9391487451d1e0e3e63bc689300c5.tar.gz
ferdium-app-49be66ce0cf9391487451d1e0e3e63bc689300c5.tar.zst
ferdium-app-49be66ce0cf9391487451d1e0e3e63bc689300c5.zip
Remove duplicated lines (probably introduced in a bad conflict-resolution step).
Added TODOs for other duplicated code that is more involved in fixing.
-rw-r--r--src/config.js1
-rw-r--r--src/index.js5
2 files changed, 2 insertions, 4 deletions
diff --git a/src/config.js b/src/config.js
index 62bbaac12..e6bd83e06 100644
--- a/src/config.js
+++ b/src/config.js
@@ -171,6 +171,7 @@ export const FILE_SYSTEM_SETTINGS_TYPES = [
171export const LOCAL_SERVER = 'You are using Ferdi without a server'; 171export const LOCAL_SERVER = 'You are using Ferdi without a server';
172export const SERVER_NOT_LOADED = 'Ferdi::SERVER_NOT_LOADED'; 172export const SERVER_NOT_LOADED = 'Ferdi::SERVER_NOT_LOADED';
173 173
174// TODO: This seems to be duplicated between here and 'index.js'
174// Set app directory before loading user modules 175// Set app directory before loading user modules
175if (process.env.FERDI_APPDATA_DIR != null) { 176if (process.env.FERDI_APPDATA_DIR != null) {
176 app.setPath('appData', process.env.FERDI_APPDATA_DIR); 177 app.setPath('appData', process.env.FERDI_APPDATA_DIR);
diff --git a/src/index.js b/src/index.js
index 0fac386df..9c0506f53 100644
--- a/src/index.js
+++ b/src/index.js
@@ -11,6 +11,7 @@ import path from 'path';
11import windowStateKeeper from 'electron-window-state'; 11import windowStateKeeper from 'electron-window-state';
12import { enforceMacOSAppLocation } from 'electron-util'; 12import { enforceMacOSAppLocation } from 'electron-util';
13 13
14// TODO: This seems to be duplicated between here and 'config.js'
14// Set app directory before loading user modules 15// Set app directory before loading user modules
15if (process.env.FERDI_APPDATA_DIR != null) { 16if (process.env.FERDI_APPDATA_DIR != null) {
16 app.setPath('appData', process.env.FERDI_APPDATA_DIR); 17 app.setPath('appData', process.env.FERDI_APPDATA_DIR);
@@ -65,10 +66,6 @@ app.allowRendererProcessReuse = false;
65debug('Set userAgent to ', userAgent()); 66debug('Set userAgent to ', userAgent());
66app.userAgentFallback = userAgent(); 67app.userAgentFallback = userAgent();
67 68
68// Globally set useragent to fix user agent override in service workers
69debug('Set userAgent to ', userAgent());
70app.userAgentFallback = userAgent();
71
72// Keep a global reference of the window object, if you don't, the window will 69// Keep a global reference of the window object, if you don't, the window will
73// be closed automatically when the JavaScript object is garbage collected. 70// be closed automatically when the JavaScript object is garbage collected.
74let mainWindow; 71let mainWindow;