From f38c71d34b12f0937f25bc891c89b53877349626 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 11 Dec 2015 02:25:33 +0000 Subject: [PATCH] update the UI whilst searching --- src/components/structures/RoomView.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 025e0f1a4f..7f089f6f9b 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -431,6 +431,10 @@ module.exports = React.createClass({ } var self = this; + self.setState({ + searchInProgress: true + }); + MatrixClientPeg.get().search({ body: { search_categories: { @@ -484,6 +488,10 @@ module.exports = React.createClass({ title: "Search failed", description: error.toString() }); + }).finally(function() { + self.setState({ + searchInProgress: false + }); }); }, @@ -951,7 +959,7 @@ module.exports = React.createClass({ aux = ; } else if (this.state.searching) { - aux = ; + aux = ; } var conferenceCallNotification = null;