From 8eb8b00460fe6b1e44c686cf92ea7324ef7139dd Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Wed, 11 Sep 2019 11:52:39 +0100
Subject: [PATCH] RoomDirectory: show spinner if loading more results
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
src/components/structures/RoomDirectory.js | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js
index 45e6a5b2b7..9a21cad0e0 100644
--- a/src/components/structures/RoomDirectory.js
+++ b/src/components/structures/RoomDirectory.js
@@ -1,6 +1,7 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
+Copyright 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -141,6 +142,10 @@ module.exports = React.createClass({
getMoreRooms: function() {
if (!MatrixClientPeg.get()) return Promise.resolve();
+ this.setState({
+ loading: true,
+ });
+
const my_filter_string = this.state.filterString;
const my_server = this.state.roomServer;
// remember the next batch token when we sent the request
@@ -555,15 +560,21 @@ module.exports = React.createClass({
let content;
if (this.state.error) {
content = this.state.error;
- } else if (this.state.protocolsLoading || this.state.loading) {
+ } else if (this.state.protocolsLoading) {
content =