mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
ElectronPlatform: Add the ability to load file events from the event index.
This commit is contained in:
parent
e3b4f189b4
commit
a2e256b4c9
2 changed files with 16 additions and 0 deletions
|
@ -370,6 +370,18 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||
}
|
||||
break;
|
||||
|
||||
case 'loadFileEvents':
|
||||
if (eventIndex === null) ret = [];
|
||||
else {
|
||||
try {
|
||||
ret = await eventIndex.loadFileEvents(args[0]);
|
||||
} catch (e) {
|
||||
sendError(payload.id, e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'loadCheckpoints':
|
||||
if (eventIndex === null) ret = [];
|
||||
else {
|
||||
|
|
|
@ -144,6 +144,10 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
|||
return this._ipcCall('removeCrawlerCheckpoint', checkpoint);
|
||||
}
|
||||
|
||||
async loadFileEvents(args): Promise<[EventAndProfile]> {
|
||||
return this._ipcCall('loadFileEvents', args);
|
||||
}
|
||||
|
||||
async loadCheckpoints(): Promise<[CrawlerCheckpoint]> {
|
||||
return this._ipcCall('loadCheckpoints');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue