mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
commit
754634ef31
@ -17,3 +17,9 @@ module.exports = {
|
|||||||
// don't use babel, so remove it & put the original back
|
// don't use babel, so remove it & put the original back
|
||||||
delete module.exports.rules["babel/no-invalid-this"];
|
delete module.exports.rules["babel/no-invalid-this"];
|
||||||
module.exports.rules["no-invalid-this"] = "error";
|
module.exports.rules["no-invalid-this"] = "error";
|
||||||
|
|
||||||
|
// also override the line length to be consistent with
|
||||||
|
// vector-web / react-sdk rather than js-sdk
|
||||||
|
module.exports.rules["max-len"] = ["warn", {
|
||||||
|
code: 120,
|
||||||
|
}];
|
||||||
|
@ -301,14 +301,14 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||||||
|
|
||||||
const sendError = (id, e) => {
|
const sendError = (id, e) => {
|
||||||
const error = {
|
const error = {
|
||||||
message: e.message
|
message: e.message,
|
||||||
}
|
};
|
||||||
|
|
||||||
mainWindow.webContents.send('seshatReply', {
|
mainWindow.webContents.send('seshatReply', {
|
||||||
id:id,
|
id: id,
|
||||||
error: error
|
error: error,
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
const args = payload.args || [];
|
const args = payload.args || [];
|
||||||
let ret;
|
let ret;
|
||||||
@ -336,16 +336,18 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'deleteEventIndex':
|
case 'deleteEventIndex':
|
||||||
const deleteFolderRecursive = async(p) => {
|
{
|
||||||
for (let entry of await afs.readdir(p)) {
|
const deleteFolderRecursive = async (p) => {
|
||||||
const curPath = path.join(p, entry);
|
for (const entry of await afs.readdir(p)) {
|
||||||
await afs.unlink(curPath);
|
const curPath = path.join(p, entry);
|
||||||
}
|
await afs.unlink(curPath);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await deleteFolderRecursive(eventStorePath);
|
await deleteFolderRecursive(eventStorePath);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -38,7 +38,6 @@ module.exports.start = function startAutoUpdate(updateBaseUrl) {
|
|||||||
// and also acts as a convenient cache-buster to ensure that when the
|
// and also acts as a convenient cache-buster to ensure that when the
|
||||||
// app updates it always gets a fresh value to avoid update-looping.
|
// app updates it always gets a fresh value to avoid update-looping.
|
||||||
url = `${updateBaseUrl}macos/?localVersion=${encodeURIComponent(app.getVersion())}`;
|
url = `${updateBaseUrl}macos/?localVersion=${encodeURIComponent(app.getVersion())}`;
|
||||||
|
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
url = `${updateBaseUrl}win32/${process.arch}/`;
|
url = `${updateBaseUrl}win32/${process.arch}/`;
|
||||||
} else {
|
} else {
|
||||||
@ -64,7 +63,7 @@ module.exports.start = function startAutoUpdate(updateBaseUrl) {
|
|||||||
// will fail if running in debug mode
|
// will fail if running in debug mode
|
||||||
console.log('Couldn\'t enable update checking', err);
|
console.log('Couldn\'t enable update checking', err);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
ipcMain.on('install_update', installUpdate);
|
ipcMain.on('install_update', installUpdate);
|
||||||
ipcMain.on('check_updates', pollForUpdates);
|
ipcMain.on('check_updates', pollForUpdates);
|
||||||
|
Loading…
Reference in New Issue
Block a user