You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Don't set busy state at all for background request
This commit is contained in:
@ -141,16 +141,20 @@ export default React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_requestCallback: function(auth, background) {
|
_requestCallback: function(auth, background) {
|
||||||
this.setState({
|
// only set the busy flag if this is a non-background request
|
||||||
busy: !background,
|
if (!background) {
|
||||||
errorText: null,
|
this.setState({
|
||||||
stageErrorText: null,
|
busy: true,
|
||||||
});
|
errorText: null,
|
||||||
|
stageErrorText: null,
|
||||||
|
});
|
||||||
|
}
|
||||||
return this.props.makeRequest(auth).finally(() => {
|
return this.props.makeRequest(auth).finally(() => {
|
||||||
if (this._unmounted) {
|
if (this._unmounted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (background) {
|
// only unset the busy flag if this is a non-background request
|
||||||
|
if (!background) {
|
||||||
this.setState({
|
this.setState({
|
||||||
busy: false,
|
busy: false,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user