mirror of https://github.com/vector-im/riot-web
If groupRoomsLoading, replace RoomDetailList entirely with Spinner
parent
775468e71a
commit
d6cbc44e0f
|
@ -657,6 +657,7 @@ export default React.createClass({
|
|||
const RoomDetailList = sdk.getComponent('rooms.RoomDetailList');
|
||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||
const TintableSvg = sdk.getComponent('elements.TintableSvg');
|
||||
const Spinner = sdk.getComponent('elements.Spinner');
|
||||
|
||||
const addRoomRow = this.state.editing ?
|
||||
(<AccessibleButton className="mx_GroupView_rooms_header_addRow"
|
||||
|
@ -674,7 +675,10 @@ export default React.createClass({
|
|||
<h3>{ _t('Rooms') }</h3>
|
||||
{ addRoomRow }
|
||||
</div>
|
||||
<RoomDetailList rooms={this.state.groupRooms} loading={this.state.groupRoomsLoading} />
|
||||
{ this.state.groupRoomsLoading ?
|
||||
<Spinner /> :
|
||||
<RoomDetailList rooms={this.state.groupRooms} />
|
||||
}
|
||||
</div>;
|
||||
},
|
||||
|
||||
|
|
|
@ -113,8 +113,6 @@ export default React.createClass({
|
|||
|
||||
worldReadable: PropTypes.bool,
|
||||
guestCanJoin: PropTypes.bool,
|
||||
|
||||
loading: PropTypes.bool,
|
||||
})),
|
||||
},
|
||||
|
||||
|
@ -126,10 +124,6 @@ export default React.createClass({
|
|||
},
|
||||
|
||||
render() {
|
||||
const Spinner = sdk.getComponent('elements.Spinner');
|
||||
if (this.props.loading) {
|
||||
return <Spinner />;
|
||||
}
|
||||
const rows = this.getRows();
|
||||
let rooms;
|
||||
if (rows.length == 0) {
|
||||
|
|
Loading…
Reference in New Issue