electron-main: Add support to set and get the user version.

This commit is contained in:
Damir Jelić 2020-06-17 17:19:15 +02:00
parent e10582749b
commit a9b4110d65

View File

@ -613,6 +613,30 @@ ipcMain.on('seshat', async function(ev, payload) {
}
break;
case 'setUserVersion':
if (eventIndex === null) break;
else {
try {
await eventIndex.setUserVersion(args[0]);
} catch (e) {
sendError(payload.id, e);
return;
}
}
break;
case 'getUserVersion':
if (eventIndex === null) ret = 0;
else {
try {
ret = await eventIndex.getUserVersion();
} catch (e) {
sendError(payload.id, e);
return;
}
}
break;
default:
mainWindow.webContents.send('seshatReply', {
id: payload.id,