forked from matrix/element-web
ElectronPlatform: Add the indexSize method.
This commit is contained in:
parent
342d717ff6
commit
e556bb242f
|
@ -381,6 +381,17 @@ ipcMain.on('seshat', async function(ev, payload) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'indexSize':
|
||||||
|
if (eventIndex === null) ret = 0;
|
||||||
|
else {
|
||||||
|
try {
|
||||||
|
ret = await eventIndex.getSize();
|
||||||
|
} catch (e) {
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
mainWindow.webContents.send('seshatReply', {
|
mainWindow.webContents.send('seshatReply', {
|
||||||
id: payload.id,
|
id: payload.id,
|
||||||
|
|
|
@ -155,6 +155,10 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
||||||
async deleteEventIndex(): Promise<> {
|
async deleteEventIndex(): Promise<> {
|
||||||
return this._ipcCall('deleteEventIndex');
|
return this._ipcCall('deleteEventIndex');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async indexSize(): Promise<> {
|
||||||
|
return this._ipcCall('indexSize');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class ElectronPlatform extends VectorBasePlatform {
|
export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
|
|
Loading…
Reference in New Issue