diff --git a/src/async-components/views/dialogs/eventindex/DisableEventIndex.js b/src/async-components/views/dialogs/eventindex/DisableEventIndex.js
index 3dcbeab454..6d0f9a43e8 100644
--- a/src/async-components/views/dialogs/eventindex/DisableEventIndex.js
+++ b/src/async-components/views/dialogs/eventindex/DisableEventIndex.js
@@ -41,12 +41,15 @@ export default class ManageEventIndex extends React.Component {
super(props);
this.state = {
- eventIndexingEnabled:
- SettingsStore.getValueAt(SettingLevel.DEVICE, 'enableEventIndexing'),
+ disabling: false,
};
}
_onDisable = async () => {
+ this.setState({
+ disabling: true,
+ });
+
const eventIndex = EventIndexPeg.get();
await SettingsStore.setValue('enableEventIndexing', null, SettingLevel.DEVICE, false);
await EventIndexPeg.deleteEventIndex();
@@ -64,12 +67,15 @@ export default class ManageEventIndex extends React.Component {
title={_t("Are you sure?")}
>
{_t("If disabled, messages form encrypted rooms won't appear in search results")}
-