mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
ElectronPlatform: Replace the indexSize method with the getStats method.
This commit is contained in:
parent
e556bb242f
commit
e1e3bba290
@ -346,6 +346,18 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'getStats':
|
||||||
|
if (eventIndex === null) ret = 0;
|
||||||
|
else {
|
||||||
|
try {
|
||||||
|
ret = await eventIndex.getStats();
|
||||||
|
} catch (e) {
|
||||||
|
sendError(payload.id, e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 'removeCrawlerCheckpoint':
|
case 'removeCrawlerCheckpoint':
|
||||||
if (eventIndex === null) ret = false;
|
if (eventIndex === null) ret = false;
|
||||||
else {
|
else {
|
||||||
@ -381,17 +393,6 @@ 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,
|
||||||
|
@ -152,12 +152,12 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
|||||||
return this._ipcCall('closeEventIndex');
|
return this._ipcCall('closeEventIndex');
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteEventIndex(): Promise<> {
|
async getStats(): Promise<> {
|
||||||
return this._ipcCall('deleteEventIndex');
|
return this._ipcCall('getStats');
|
||||||
}
|
}
|
||||||
|
|
||||||
async indexSize(): Promise<> {
|
async deleteEventIndex(): Promise<> {
|
||||||
return this._ipcCall('indexSize');
|
return this._ipcCall('deleteEventIndex');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user