ElectronPlatform: Add the indexSize method.

This commit is contained in:
Damir Jelić 2019-11-22 11:02:52 +01:00
parent 342d717ff6
commit e556bb242f
2 changed files with 15 additions and 0 deletions
electron_app/src
src/vector/platform

View file

@ -381,6 +381,17 @@ ipcMain.on('seshat', async function(ev, payload) {
}
break;
case 'indexSize':
if (eventIndex === null) ret = 0;
else {
try {
ret = await eventIndex.getSize();
} catch (e) {
ret = 0;
}
}
break;
default:
mainWindow.webContents.send('seshatReply', {
id: payload.id,

View file

@ -155,6 +155,10 @@ class SeshatIndexManager extends BaseEventIndexManager {
async deleteEventIndex(): Promise<> {
return this._ipcCall('deleteEventIndex');
}
async indexSize(): Promise<> {
return this._ipcCall('indexSize');
}
}
export default class ElectronPlatform extends VectorBasePlatform {