If groupRoomsLoading, replace RoomDetailList entirely with Spinner
This commit is contained in:
parent
775468e71a
commit
d6cbc44e0f
2 changed files with 5 additions and 7 deletions
|
@ -657,6 +657,7 @@ export default React.createClass({
|
||||||
const RoomDetailList = sdk.getComponent('rooms.RoomDetailList');
|
const RoomDetailList = sdk.getComponent('rooms.RoomDetailList');
|
||||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
const TintableSvg = sdk.getComponent('elements.TintableSvg');
|
const TintableSvg = sdk.getComponent('elements.TintableSvg');
|
||||||
|
const Spinner = sdk.getComponent('elements.Spinner');
|
||||||
|
|
||||||
const addRoomRow = this.state.editing ?
|
const addRoomRow = this.state.editing ?
|
||||||
(<AccessibleButton className="mx_GroupView_rooms_header_addRow"
|
(<AccessibleButton className="mx_GroupView_rooms_header_addRow"
|
||||||
|
@ -674,7 +675,10 @@ export default React.createClass({
|
||||||
<h3>{ _t('Rooms') }</h3>
|
<h3>{ _t('Rooms') }</h3>
|
||||||
{ addRoomRow }
|
{ addRoomRow }
|
||||||
</div>
|
</div>
|
||||||
<RoomDetailList rooms={this.state.groupRooms} loading={this.state.groupRoomsLoading} />
|
{ this.state.groupRoomsLoading ?
|
||||||
|
<Spinner /> :
|
||||||
|
<RoomDetailList rooms={this.state.groupRooms} />
|
||||||
|
}
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -113,8 +113,6 @@ export default React.createClass({
|
||||||
|
|
||||||
worldReadable: PropTypes.bool,
|
worldReadable: PropTypes.bool,
|
||||||
guestCanJoin: PropTypes.bool,
|
guestCanJoin: PropTypes.bool,
|
||||||
|
|
||||||
loading: PropTypes.bool,
|
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -126,10 +124,6 @@ export default React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const Spinner = sdk.getComponent('elements.Spinner');
|
|
||||||
if (this.props.loading) {
|
|
||||||
return <Spinner />;
|
|
||||||
}
|
|
||||||
const rows = this.getRows();
|
const rows = this.getRows();
|
||||||
let rooms;
|
let rooms;
|
||||||
if (rows.length == 0) {
|
if (rows.length == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue