BasePlatform: Move the event indexing methods into a separate class.

This commit is contained in:
Damir Jelić 2019-11-13 12:25:16 +01:00
parent 80b28004e1
commit f453fea24a
4 changed files with 246 additions and 71 deletions

View file

@ -46,9 +46,11 @@ class EventIndexPeg {
* otherwise.
*/
async init() {
const platform = PlatformPeg.get();
if (!platform.supportsEventIndexing()) return false;
const indexManager = PlatformPeg.get().getEventIndexingManager();
console.log("Initializing event index, got {}", indexManager);
if (indexManager === null) return false;
console.log("Seshat: Creatingnew EventIndex object", indexManager);
const index = new EventIndex();
const userId = MatrixClientPeg.get().getUserId();