MatrixChat: Move the event indexing logic into separate modules.

This commit is contained in:
Damir Jelić 2019-11-12 13:29:07 +01:00
parent 2c5565e502
commit cfdcf45ac6
5 changed files with 499 additions and 356 deletions

View file

@ -31,6 +31,7 @@ import MatrixClientBackedSettingsHandler from "./settings/handlers/MatrixClientB
import * as StorageManager from './utils/StorageManager';
import IdentityAuthClient from './IdentityAuthClient';
import PlatformPeg from "./PlatformPeg";
import EventIndexPeg from "./EventIndexPeg";
interface MatrixClientCreds {
homeserverUrl: string,
@ -223,9 +224,6 @@ class MatrixClientPeg {
this.matrixClient = createMatrixClient(opts);
const platform = PlatformPeg.get();
if (platform.supportsEventIndexing()) platform.initEventIndex(creds.userId);
// we're going to add eventlisteners for each matrix event tile, so the
// potential number of event listeners is quite high.
this.matrixClient.setMaxListeners(500);