mirror of https://github.com/vector-im/riot-web
ElectronPlatform: Add the indexSize method.
parent
342d717ff6
commit
e556bb242f
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue