-
Notifications
You must be signed in to change notification settings - Fork 3k
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
clear callbacks when closing the account #26119
clear callbacks when closing the account #26119
Conversation
Reviewer Checklist
Screenshots/VideosWebchrome-desktop-2023-08-30_13.49.14.mp4Mobile Web - Chromeandroid-chrome.mp4Mobile Web - Safariios-safari-2023-08-30_11.57.13.mp4Desktopmac-desktop-2023-08-30_11.59.52.mp4iOSios-native-2023-08-30_11.51.34.mp4Androidandroid-native-2023-08-30_14.23.24.mp4 |
@b4s36t4 Reviewing now - just noticed that you're missing mWeb screenshots for Chrome & Safari, can you add them? |
Hey @jjcoffee sorry forget them. Will add and ping you soon. |
@b4s36t4 Could you also tweak the test steps to match the issue, so step 4 should be to login with a new email address (that doesn't have an account). I know the error was happening in normal login case too, but it's easier to test the fix if we just follow the original issue, I think! Offline tests should also be N/A since we can't login whilst offline 😄 |
@jjcoffee Updated the things you suggested. Sorry to wait you up though :). Thanks. |
src/libs/actions/User.js
Outdated
@@ -70,6 +71,8 @@ function closeAccount(message) { | |||
], | |||
}, | |||
); | |||
// Clear all the listeners/callback that are registered while logged-in |
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.
Little nitpick here; I think the comment could explain why we need to do this cleanup - otherwise it won't make sense for future readers of the code and we could just leave out the comment altogether.
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.
So shall I remove the comment? or update the comment?
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.
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.
@b4s36t4 That would be a tiny bit too long 😅 Just a sentence to explain why we're running cleanup actions will do.
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.
Sure, sorry I'm a bit weak in commenting :)
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.
@jjcoffee This works right?
Co-authored-by: Joel Davies <joeld.dev@gmail.com>
Thanks a lot @jjcoffee :) committed the suggested change. Really sorry. |
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.
LGTM!
(Note: there's a merge freeze at the moment so there may be a delay getting this merged.)
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/jasperhuangg in version: 1.3.68-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.68-17 🚀
|
Details
Clears all callbacks when we're closing the account.
Fixed Issues
$ #25793
PROPOSAL: #25793 (comment)
Tests
Offline tests
NA - No login possible when offline
QA Steps
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
web.mp4
Mobile Web - Chrome
https://drive.google.com/file/d/1UH_kQ4dPMtVSNK8ZFtk4R-SwffetPMES/view?usp=sharing
Mobile Web - Safari
Kapture.2023-08-30.at.15.07.12.mp4
Desktop
desktop.mp4
iOS
ios.mp4
Android
android.mp4