You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
update the UI whilst searching
This commit is contained in:
@ -431,6 +431,10 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
self.setState({
|
||||||
|
searchInProgress: true
|
||||||
|
});
|
||||||
|
|
||||||
MatrixClientPeg.get().search({
|
MatrixClientPeg.get().search({
|
||||||
body: {
|
body: {
|
||||||
search_categories: {
|
search_categories: {
|
||||||
@ -484,6 +488,10 @@ module.exports = React.createClass({
|
|||||||
title: "Search failed",
|
title: "Search failed",
|
||||||
description: error.toString()
|
description: error.toString()
|
||||||
});
|
});
|
||||||
|
}).finally(function() {
|
||||||
|
self.setState({
|
||||||
|
searchInProgress: false
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -951,7 +959,7 @@ module.exports = React.createClass({
|
|||||||
aux = <Loader/>;
|
aux = <Loader/>;
|
||||||
}
|
}
|
||||||
else if (this.state.searching) {
|
else if (this.state.searching) {
|
||||||
aux = <SearchBar ref="search_bar" onCancelClick={this.onCancelClick} onSearch={this.onSearch}/>;
|
aux = <SearchBar ref="search_bar" searchInProgress={this.state.searchInProgress } onCancelClick={this.onCancelClick} onSearch={this.onSearch}/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
var conferenceCallNotification = null;
|
var conferenceCallNotification = null;
|
||||||
|
Reference in New Issue
Block a user