mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
ElectronPlatform: Add the indexSize method.
This commit is contained in:
parent
342d717ff6
commit
e556bb242f
2 changed files with 15 additions and 0 deletions
|
@ -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 a new issue