1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

EventIndexPanel: Move the comments around for the getStats calls.

This commit is contained in:
Damir Jelić
2020-02-19 14:17:19 +01:00
parent a650c47d6b
commit 81e61d6f9d
2 changed files with 10 additions and 4 deletions

View File

@@ -50,11 +50,11 @@ export default class ManageEventIndexDialog extends React.Component {
const eventIndex = EventIndexPeg.get();
let stats;
// This call may fail if sporadically, not a huge issue as we will try
// later again and probably succeed.
try {
stats = await eventIndex.getStats();
} catch {
// This call may fail if sporadically, not a huge issue as we will
// try later again and probably succeed.
return;
}
@@ -99,6 +99,9 @@ export default class ManageEventIndexDialog extends React.Component {
eventIndexSize = stats.size;
eventCount = stats.eventCount;
} catch {
// This call may fail if sporadically, not a huge issue as we
// will try later again in the updateCurrentRoom call and
// probably succeed.
}
const roomStats = eventIndex.crawlingRooms();

View File

@@ -41,11 +41,11 @@ export default class EventIndexPanel extends React.Component {
const eventIndex = EventIndexPeg.get();
let stats;
// This call may fail if sporadically, not a huge issue as we will try
// later again and probably succeed.
try {
stats = await eventIndex.getStats();
} catch {
// This call may fail if sporadically, not a huge issue as we will
// try later again and probably succeed.
return;
}
@@ -83,6 +83,9 @@ export default class EventIndexPanel extends React.Component {
eventIndexSize = stats.size;
roomCount = stats.roomCount;
} catch {
// This call may fail if sporadically, not a huge issue as we
// will try later again in the updateCurrentRoom call and
// probably succeed.
}
}