From 36951dd7b7806684661be4677eac5938928565a9 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 15 Apr 2019 18:49:00 +0200 Subject: [PATCH] cleanup spinner props and use always preview bar when room operation is in progress --- src/components/structures/RoomView.js | 29 ++++++++++++-------- src/components/views/rooms/RoomPreviewBar.js | 26 +++++++++++------- src/i18n/strings/en_EN.json | 6 ++-- 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 44ab922df4..85bfd10bcc 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1496,16 +1496,21 @@ module.exports = React.createClass({ const ScrollPanel = sdk.getComponent("structures.ScrollPanel"); const TintableSvg = sdk.getComponent("elements.TintableSvg"); const RoomPreviewBar = sdk.getComponent("rooms.RoomPreviewBar"); - const Loader = sdk.getComponent("elements.Spinner"); const TimelinePanel = sdk.getComponent("structures.TimelinePanel"); const RoomUpgradeWarningBar = sdk.getComponent("rooms.RoomUpgradeWarningBar"); const RoomRecoveryReminder = sdk.getComponent("rooms.RoomRecoveryReminder"); if (!this.state.room) { - if (this.state.roomLoading || this.state.peekLoading) { + const loading = this.state.roomLoading || this.state.peekLoading; + if (loading) { return (
- +
); } else { @@ -1528,8 +1533,7 @@ module.exports = React.createClass({ onRejectClick={this.onRejectThreepidInviteButtonClicked} canPreview={false} error={this.state.roomLoadError} roomAlias={roomAlias} - spinner={this.state.joining} - spinnerState="joining" + joining={this.state.joining} inviterName={inviterName} invitedEmail={invitedEmail} room={this.state.room} @@ -1543,9 +1547,12 @@ module.exports = React.createClass({ if (myMembership == 'invite') { if (this.state.joining || this.state.rejecting) { return ( -
- -
+ ); } else { const myUserId = MatrixClientPeg.get().credentials.userId; @@ -1565,8 +1572,7 @@ module.exports = React.createClass({ onRejectClick={this.onRejectButtonClicked} inviterName={inviterName} canPreview={false} - spinner={this.state.joining} - spinnerState="joining" + joining={this.state.joining} room={this.state.room} /> @@ -1656,8 +1662,7 @@ module.exports = React.createClass({