You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.2 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{1439:function(e,n,s){"use strict";s.r(n),s.d(n,"default",(function(){return b}));var t=s(5),a=s.n(t),i=s(0),r=s.n(i),o=s(3),l=s(2),d=s.n(l),c=s(6),u=s(1),p=s(7),h=s(51);class b extends r.a.Component{constructor(e){super(e),a()(this,"_onDisable",async()=>{this.setState({disabling:!0}),await p.b.setValue("enableEventIndexing",null,p.a.DEVICE,!1),await h.a.deleteEventIndex(),this.props.onFinished(),c.a.dispatch({action:"view_user_settings"})}),this.state={disabling:!1}}render(){const e=o.a("views.dialogs.BaseDialog"),n=o.a("elements.Spinner"),s=o.a("views.elements.DialogButtons");return r.a.createElement(e,{onFinished:this.props.onFinished,title:Object(u.a)("Are you sure?")},Object(u.a)("If disabled, messages from encrypted rooms won't appear in search results."),this.state.disabling?r.a.createElement(n,null):r.a.createElement("div",null),r.a.createElement(s,{primaryButton:Object(u.a)("Disable"),onPrimaryButtonClick:this._onDisable,primaryButtonClass:"danger",cancelButtonClass:"warning",onCancel:this.props.onFinished,disabled:this.state.disabling}))}}a()(b,"propTypes",{onFinished:d.a.func.isRequired})}}]);