From 81e61d6f9d946d0ee9cc6868831573b7c2094f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 19 Feb 2020 14:17:19 +0100 Subject: [PATCH] EventIndexPanel: Move the comments around for the getStats calls. --- .../views/dialogs/eventindex/ManageEventIndexDialog.js | 7 +++++-- src/components/views/settings/EventIndexPanel.js | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.js b/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.js index 318ef9ec8f..f3ea3beb1c 100644 --- a/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.js +++ b/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.js @@ -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(); diff --git a/src/components/views/settings/EventIndexPanel.js b/src/components/views/settings/EventIndexPanel.js index c74d99cec9..80d93c4562 100644 --- a/src/components/views/settings/EventIndexPanel.js +++ b/src/components/views/settings/EventIndexPanel.js @@ -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. } }