-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 cache on signout #20477
Clear cache on signout #20477
Conversation
@alex-mechler @mollfpr One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Bump @mollfpr! |
Sorry for the delay! I'll do complete review soon. |
Reviewer Checklist
Screenshots/VideosWeb20477.Web.movMobile Web - Chrome20477.mWeb.Chrome.webmMobile Web - Safari20477.mWeb.Safari.mp4Desktop20477.Desktop.moviOS20477.iOS.movAndroid20477.Android.webm |
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.
Tests well and LGTM. Just minor to get more thought on what unlink
does.
import {CachesDirectoryPath, unlink} from 'react-native-fs'; | ||
|
||
function clearStorage() { | ||
return unlink(CachesDirectoryPath); |
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.
I think it's better if we add a comment here to explain what unlink does.
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.
Updated
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 👍
All yours @alex-mechler
✋ 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/alex-mechler in version: 1.3.28-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
Details
This PR edits the
SignOut
action such that the application gets cleared as well.Fixed Issues
$ #19767
PROPOSAL: #19767 (comment)
Tests
On Android, install the App and then go to Settings -> Storage -> Other Apps -> New Expensify
Note the cache size and open the app and login to any account.
Logout and then go back to the Settings -> Storage -> Other Apps -> New Expensify
Verify that the cache size is significantly less.
With the iOS app running in simulator, open the following directory:
Caches
directory.Caches
directory has increased significantly and thenLogout
.Caches
directory is reduced.Device Id
andApp Id
can be fetched by following this brilliant answer.Offline tests
N/A
QA Steps
I'm not sure how the QA can test this on iOS.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Screen.Recording.2023-06-08.at.11.01.43.PM.mov
Mobile Web - Chrome
Screen.Recording.2023-06-08.at.11.02.16.PM.mov
Mobile Web - Safari
Screen.Recording.2023-06-08.at.11.43.35.PM.mov
Desktop
Screen.Recording.2023-06-08.at.11.37.58.PM.mov
iOS
Screen.Recording.2023-06-08.at.11.42.36.PM.mov
Android
Screen.Recording.2023-06-08.at.10.58.30.PM.mov