Skip to content

Conversation

@langleyd
Copy link
Member

@langleyd langleyd commented Oct 24, 2025

depends on #30980

What's in this PR?

This PR builds upon #30980 updating usages of RoomViewStore within the RoomView sub components to use the instance provided by the context rather than the singleton.

Easiest read commit by commit.

@langleyd langleyd requested a review from florianduros October 24, 2025 15:05
member instanceof RoomMember && member.roomId
? member.roomId
: SdkContextClass.instance.roomViewStore.getRoomId();
const memberOrRoomRoomId = member instanceof RoomMember && member.roomId ? member.roomId : roomId;
Copy link
Member

@t3chguy t3chguy Oct 27, 2025

Choose a reason for hiding this comment

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

I think this identifier is confusing, if anything it should be memberRoomIdOrRoomRoomId but that isn't really better, what was wrong with roomId? Just the clash? Then maybe the receiver should be tweaked to avoid this confusion. Or you could mutate it if (member instanceof RoomMember && member.roomId) roomId = member.roomId;

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea it was mainly the clash.

What do you mean by "Then maybe the receiver should be tweaked to avoid this confusion."?

Copy link
Member

Choose a reason for hiding this comment

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

The parameter name could be fallbackRoomId or something

@langleyd langleyd added this pull request to the merge queue Oct 29, 2025
Merged via the queue into develop with commit ae2acdf Oct 29, 2025
35 checks passed
@langleyd langleyd deleted the langleyd/use-context-rvs branch October 29, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants