-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: unsub userIsTyping event on report screen unmount #43409
Conversation
Signed-off-by: dominictb <tb-dominic@outlook.com>
src/pages/home/ReportScreen.tsx
Outdated
@@ -462,6 +462,7 @@ function ReportScreen({ | |||
}); | |||
return () => { | |||
interactionTask.cancel(); | |||
Report.unsubscribeFromReportChannel(report.reportID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we're not checking for didSubscribeToReportTypingEvents.current
here (as you originally proposed)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @jjcoffee , I believe that you guys love it more when the subscribe/unsubscribe of those events will be in the same place to fit DRY perspective, so I pushed some change to optimize the code a bit. Also, updated the evidence. Please help review!
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-06-11_16.34.23.mp4Android: mWeb Chromeandroid-chrome-2024-06-11_16.38.27.mp4iOS: Nativeios-app-2024-06-11_16.55.19.mp4iOS: mWeb Safariios-safari-2024-06-11_16.58.13.mp4MacOS: Chrome / Safaridesktop-chrome-2024-06-11_15.56.44.mp4MacOS: Desktopdesktop-app-2024-06-11_16.15.57.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add test steps and the screenshot for Android mWeb? Thanks!
Signed-off-by: dominictb <tb-dominic@outlook.com>
@dominictb This is what I see under Also, please can you add test steps? Thanks! |
@jjcoffee done! |
Signed-off-by: dominictb <tb-dominic@outlook.com>
Details
Fixed Issues
$ #43089
PROPOSAL: #43089 (comment)
Tests
Verify: In the debug log we have these 3 log lines after exit from a chat report
i.e: all pusher event subscription has been cancelled after report screen is unmounted
Offline tests
QA Steps
Verify: In the debug log we have these 3 log lines indicating event unsubscription after exit from a chat report
i.e: all pusher event subscription has been cancelled after report screen is unmounted
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop