1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

Enable indent rule and fix indent

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-04-27 17:23:27 +02:00
parent 33617b0375
commit 46bfbbadf9
87 changed files with 693 additions and 537 deletions

View File

@@ -127,8 +127,13 @@ export default class EventIndex extends EventEmitter {
this.crawlerCheckpoints.push(forwardCheckpoint);
}
} catch (e) {
console.log("EventIndex: Error adding initial checkpoints for room",
room.roomId, backCheckpoint, forwardCheckpoint, e);
console.log(
"EventIndex: Error adding initial checkpoints for room",
room.roomId,
backCheckpoint,
forwardCheckpoint,
e,
);
}
}));
}
@@ -379,8 +384,12 @@ export default class EventIndex extends EventEmitter {
try {
await indexManager.addCrawlerCheckpoint(checkpoint);
} catch (e) {
console.log("EventIndex: Error adding new checkpoint for room",
room.roomId, checkpoint, e);
console.log(
"EventIndex: Error adding new checkpoint for room",
room.roomId,
checkpoint,
e,
);
}
this.crawlerCheckpoints.push(checkpoint);
@@ -459,7 +468,7 @@ export default class EventIndex extends EventEmitter {
} catch (e) {
if (e.httpStatus === 403) {
console.log("EventIndex: Removing checkpoint as we don't have ",
"permissions to fetch messages from this room.", checkpoint);
"permissions to fetch messages from this room.", checkpoint);
try {
await indexManager.removeCrawlerCheckpoint(checkpoint);
} catch (e) {
@@ -589,7 +598,7 @@ export default class EventIndex extends EventEmitter {
// to do here anymore.
if (!newCheckpoint) {
console.log("EventIndex: The server didn't return a valid ",
"new checkpoint, not continuing the crawl.", checkpoint);
"new checkpoint, not continuing the crawl.", checkpoint);
continue;
}
@@ -599,12 +608,12 @@ export default class EventIndex extends EventEmitter {
// the new checkpoint to be used by the crawler.
if (eventsAlreadyAdded === true && newCheckpoint.fullCrawl !== true) {
console.log("EventIndex: Checkpoint had already all events",
"added, stopping the crawl", checkpoint);
"added, stopping the crawl", checkpoint);
await indexManager.removeCrawlerCheckpoint(newCheckpoint);
} else {
if (eventsAlreadyAdded === true) {
console.log("EventIndex: Checkpoint had already all events",
"added, but continuing due to a full crawl", checkpoint);
"added, but continuing due to a full crawl", checkpoint);
}
this.crawlerCheckpoints.push(newCheckpoint);
}
@@ -777,7 +786,7 @@ export default class EventIndex extends EventEmitter {
* timeline, false otherwise.
*/
async populateFileTimeline(timelineSet, timeline, room, limit = 10,
fromEvent = null, direction = EventTimeline.BACKWARDS) {
fromEvent = null, direction = EventTimeline.BACKWARDS) {
const matrixEvents = await this.loadFileEvents(room, limit, fromEvent, direction);
// If this is a normal fill request, not a pagination request, we need
@@ -807,7 +816,7 @@ export default class EventIndex extends EventEmitter {
}
console.log("EventIndex: Populating file panel with", matrixEvents.length,
"events and setting the pagination token to", paginationToken);
"events and setting the pagination token to", paginationToken);
timeline.setPaginationToken(paginationToken, EventTimeline.BACKWARDS);
return ret;