-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Persist notification cache to internal storage #23825
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
Conversation
…atic/non-static references
|
@Julesssss I think C+ Help might not be needed here, If needed let me know I'm happy to assist, thanks! |
| e.printStackTrace(); | ||
| result = new HashMap<>(); |
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.
In the case where casting the object to result fails, can we assume it is malformed and wipe it?
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.
Reading the file could fail in a few ways, but in any case, the file will get overwritten once we're done processing the notification and update the cache
android/app/src/main/java/com/expensify/chat/customairshipextender/NotificationCache.java
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/expensify/chat/customairshipextender/NotificationCache.java
Show resolved
Hide resolved
Julesssss
left a 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.
Haven't had a chance to test it manually yet but the code is looking good.
|
🧪🧪 Use the links below to test this build in android and iOS. Happy testing! 🧪🧪 |
|
@Santhosh-Sellavel Jules is OOO until next week. If you can review in the meantime it'd be appreciated |
|
@arosiclair I will do it, later today! |
Reviewer Checklist
Screenshots/VideosAndroidTestPR.mp4 |
Santhosh-Sellavel
left a 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.
Except this everything else looks good and tests well!
...d/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java
Show resolved
Hide resolved
Julesssss
left a 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.
👍
@Santhosh-Sellavel good spot but I already have an issue for this (it exists, but I don't have the link ATM) |
|
✋ 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/Julesssss in version: 1.3.51-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.51-2 🚀
|
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.52-0 🚀
|
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.52-5 🚀
|


Details
Moves our notification cache to a static class that writes and reads its data to internal storage. Fixes an issue where messages don't thread after the app has been killed because the in-memory cache was lost.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/258537
$ #22972
Tests
Android test only
Notification threading
Notification threading after the app is killed
Dismissing notification
Opening the notification
Offline tests
None
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
N/A
Mobile Web - Chrome
N/A
Mobile Web - Safari
N/A
Desktop
N/A
iOS
N/A
Android
screen-20230801-152047.2.mp4