Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

postpone loading the members until the user joined the room #2165

Merged
merged 3 commits into from
Sep 17, 2018

Conversation

bwindels
Copy link
Contributor

@bwindels bwindels commented Sep 13, 2018

when peeking, the members weren't being loaded at all because
the room wasn't available yet,
and the need for loading the members was never re-evaluated after that.

This only loads the members once the user has joined the room,
which also helps to avoid load all the members before an invite
is accepted.

Fixes element-hq/element-web#7321

when peeking, the members weren't being loaded at all because
the room wasn't available yet,
and the need for loading the members was never re-evaluated after that.

This only loads the members once the user has joined the room,
which also helps to avoid load all the members before an invite
is accepted.
@bwindels bwindels changed the title Bwindels/fixllpeeking postpone loading the members until the user joined the room Sep 13, 2018
@bwindels bwindels requested a review from a team September 14, 2018 07:32
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

@@ -163,14 +168,28 @@ module.exports = React.createClass({
}
},

onRoom: function(room) {
onRoom: async function(room) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No await added though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, had to code shifted around more before landing at this.

this._loadMembersIfNeeded();
},

onRoomMembership: async function(ev, member, oldMembership) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no await here either

@dbkr dbkr merged commit f651261 into develop Sep 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants