Move config-getting to VectorBasePlatform

in Electron get config via IPC from main process
which has access to the "local" config.json override file
and can make people happy :D

Remove bunch of duplicated code,
and move comments around to put them in the right place

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2019-06-26 21:08:04 +01:00
parent fceb05e646
commit 974797648f
5 changed files with 22 additions and 40 deletions

View file

@ -1,8 +1,8 @@
/*
Copyright 2016 Aviral Dasgupta
Copyright 2016 OpenMarket Ltd
Copyright 2017 Michael Telatynski <7t3chguy@gmail.com>
Copyright 2018 New Vector Ltd
Copyright 2017, 2019 Michael Telatynski <7t3chguy@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -173,6 +173,9 @@ ipcMain.on('ipcCall', async function(ev, payload) {
await migrateFromOldOrigin();
migratingOrigin = false;
break;
case 'getConfig':
ret = vectorConfig;
break;
default:
mainWindow.webContents.send('ipcReply', {
id: payload.id,