Merge pull request #1100 from matrix-org/luke/fix-show-spinner-on-accept-invite
Show a spinner when accepting an invite and waitingForRoom
This commit is contained in:
commit
13efd62964
1 changed files with 7 additions and 3 deletions
|
@ -1440,6 +1440,10 @@ module.exports = React.createClass({
|
||||||
const Loader = sdk.getComponent("elements.Spinner");
|
const Loader = sdk.getComponent("elements.Spinner");
|
||||||
const TimelinePanel = sdk.getComponent("structures.TimelinePanel");
|
const TimelinePanel = sdk.getComponent("structures.TimelinePanel");
|
||||||
|
|
||||||
|
// Whether the preview bar spinner should be shown. We do this when joining or
|
||||||
|
// when waiting for a room to be returned by js-sdk when joining
|
||||||
|
const previewBarSpinner = this.state.joining || this.state.waitingForRoom;
|
||||||
|
|
||||||
if (!this.state.room) {
|
if (!this.state.room) {
|
||||||
if (this.state.roomLoading || this.state.peekLoading) {
|
if (this.state.roomLoading || this.state.peekLoading) {
|
||||||
return (
|
return (
|
||||||
|
@ -1473,7 +1477,7 @@ module.exports = React.createClass({
|
||||||
onRejectClick={ this.onRejectThreepidInviteButtonClicked }
|
onRejectClick={ this.onRejectThreepidInviteButtonClicked }
|
||||||
canPreview={ false } error={ this.state.roomLoadError }
|
canPreview={ false } error={ this.state.roomLoadError }
|
||||||
roomAlias={room_alias}
|
roomAlias={room_alias}
|
||||||
spinner={this.state.joining || this.state.waitingForRoom}
|
spinner={previewBarSpinner}
|
||||||
inviterName={inviterName}
|
inviterName={inviterName}
|
||||||
invitedEmail={invitedEmail}
|
invitedEmail={invitedEmail}
|
||||||
room={this.state.room}
|
room={this.state.room}
|
||||||
|
@ -1516,7 +1520,7 @@ module.exports = React.createClass({
|
||||||
onRejectClick={ this.onRejectButtonClicked }
|
onRejectClick={ this.onRejectButtonClicked }
|
||||||
inviterName={ inviterName }
|
inviterName={ inviterName }
|
||||||
canPreview={ false }
|
canPreview={ false }
|
||||||
spinner={this.state.joining}
|
spinner={previewBarSpinner}
|
||||||
room={this.state.room}
|
room={this.state.room}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1592,7 +1596,7 @@ module.exports = React.createClass({
|
||||||
<RoomPreviewBar onJoinClick={this.onJoinButtonClicked}
|
<RoomPreviewBar onJoinClick={this.onJoinButtonClicked}
|
||||||
onForgetClick={ this.onForgetClick }
|
onForgetClick={ this.onForgetClick }
|
||||||
onRejectClick={this.onRejectThreepidInviteButtonClicked}
|
onRejectClick={this.onRejectThreepidInviteButtonClicked}
|
||||||
spinner={this.state.joining || this.state.waitingForRoom}
|
spinner={previewBarSpinner}
|
||||||
inviterName={inviterName}
|
inviterName={inviterName}
|
||||||
invitedEmail={invitedEmail}
|
invitedEmail={invitedEmail}
|
||||||
canPreview={this.state.canPeek}
|
canPreview={this.state.canPeek}
|
||||||
|
|
Loading…
Reference in a new issue