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

Fix showing peek preview while LL members are loading #2126

Merged
merged 5 commits into from
Aug 22, 2018

Conversation

bwindels
Copy link
Contributor

@bwindels bwindels commented Aug 22, 2018

If you haven't been active in a room for a while, you might see the peek screen as your membership is not known. This fixes it by relying on room.getMyMembership which falls back to the sync response section a room appears in (invite, join, ...).

@bwindels
Copy link
Contributor Author

Fixes the peek item in element-hq/element-web#7182

@bwindels
Copy link
Contributor Author

Also this: element-hq/element-web#7209

@bwindels bwindels requested a review from a team August 22, 2018 12:11
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.

Weird that the tests doesn't think getMyMembership() exists

@bwindels
Copy link
Contributor Author

@dbkr that must be a mock missing that method, I'll fix it

@bwindels bwindels merged commit 6967bcb into develop Aug 22, 2018
@bwindels bwindels deleted the bwindels/fixllpeek branch August 22, 2018 14:11
@dbkr
Copy link
Member

dbkr commented Aug 22, 2018

appears to be breaking on /develop - reverting while I work out why

@dbkr
Copy link
Member

dbkr commented Aug 22, 2018

answer: getJoinedMembers() in on Room whilst getJoinedMemberCount() is on RoomState...

dbkr added a commit to matrix-org/matrix-js-sdk that referenced this pull request Aug 22, 2018
On Room, because it's super confusing that Room has
getJoinedMembers() but not getJoinedMemberCount()

matrix-org/matrix-react-sdk#2126 had assumed
that this method was on Room
@bwindels bwindels restored the bwindels/fixllpeek branch September 14, 2018 11:55
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