fix: blocked by peer status #5732
Analysis complete
Summary
This pull request fixes the blocked status propagation in the comms layer and updates the passport and user context menu UIs to reflect the blocked status of the user and the peer. It renames the field hasBlocked
to isBlockedByPeer
in the PlayerPassportModel
and the PassportPlayerInfoComponentController
classes, and uses the blocked status from the comms layer and the user profile model in the PassportPlayerInfoComponentView
and the UserContextMenu
classes. It also comments out the lines that clear the blocked and muted lists of the user profile in the sagas.ts
file.
Walkthrough
- Rename
hasBlocked
field toisBlockedByPeer
inPlayerPassportModel
andPassportPlayerInfoComponentController
classes to reflect new naming convention and clarify meaning (link, link) - Remove unused
isBlocked
field fromPassportPlayerInfoComponentView
class and useisBlocked
field fromPlayerPassportModel
instead (link, link) - Add call to
SetIsBlockedByPeer
inRefreshControl
method ofPassportPlayerInfoComponentView
class to update UI with blocked status of peer (link) - Modify conditions in
SetFriendStatus
andSetIsBlocked
methods ofPassportPlayerInfoComponentView
class to hide friend status if user or peer is blocked (link, link) - Rename
SetHasBlockedOwnUser
method toSetIsBlockedByPeer
and add call toDisableAllFriendFlowButtons
inPassportPlayerInfoComponentView
class to hide friend buttons if user or peer is blocked (link) - Add
blockedContainer
andisBlockedByPeer
fields toUserContextMenu
class to show blocked label in user context menu UI (link, link) - Modify condition in
ProcessActiveElements
method ofUserContextMenu
class to hide message button if user or peer is blocked (link) - Modify assignment of
configFlags
variable inSetup
method ofUserContextMenu
class to useownUserProfile
variable instead of callingUserProfile.GetOwnUserProfile()
multiple times (link) - Modify assignment of
isBlocked
andisBlockedByPeer
fields anduserName
text inSetup
method ofUserContextMenu
class to useIsBlocked
method andprofile.userName
field from user profile model (link) - Modify assignments of
friendRemoveContainer
,deleteFriendButton
, andfriendAddContainer
game objects inSetupFriendship
method ofUserContextMenu
class to hide friend buttons if user or peer is blocked (link, link, link) - Add assignments of
blockedContainer
game object inSetupFriendship
method ofUserContextMenu
class to show blocked label in user context menu UI for different friendship statuses (link, link, link, link) - Comment out lines that clear blocked and muted lists of user profile in
sagas.ts
file, because blocked status propagation has been re-enabled (link)
Poem
hasBlocked
renamed
comms layer propagates block
autumn leaves friendship
Emoji
🚫🛂🍽️
Include these descriptions in your pull request description by including the following marker tags:
copilot:all
: all the content, in one gocopilot:summary
: a one paragraph summary of the code changescopilot:walkthrough
: a step by step walkthrough of the code changescopilot:poem
: a poem about the code changes!copilot:emoji
: three emoji that capture the changes
Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here]
.
Details
Copilot for PRs is a limited technical preview from GitHub Next.
It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.
To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord
File | Status | Duration |
---|---|---|
Summary & Walkthrough | ✅ Finished | 106.3 seconds |
browser-interface/packages/shared/comms/sagas.ts | ✅ Finished | 82 seconds |
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Passport/Passport/PlayerInfo/PassportPlayerInfoComponentController.cs | ✅ Finished | 82 seconds |
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Passport/Passport/PlayerInfo/PassportPlayerInfoComponentView.cs | ✅ Finished | 84.4 seconds |
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Passport/Passport/PlayerPassportModel.cs | ✅ Finished | 82 seconds |
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/SocialBarPrefabs/UserContextMenu/UserContextMenuPanel.prefab | 🤷♂️ Skipped (change too big) | 0 seconds |
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/UserContextMenu/Scripts/UserContextMenu.cs | ✅ Finished | 84.1 seconds |
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/SocialBarPrefabs/UserContextMenu/UserContextMenuPanel.prefab
was skipped. 588 lines were added or removed, with the largest change updating 400 lines.