-
Notifications
You must be signed in to change notification settings - Fork 1.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
🤖 Use multiple avatars for multiple new likes or subscribers #20133
🤖 Use multiple avatars for multiple new likes or subscribers #20133
Conversation
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
9d9252b
to
504e7d3
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feature/notifications_refresh_p1 #20133 +/- ##
====================================================================
- Coverage 40.21% 40.20% -0.01%
====================================================================
Files 1468 1468
Lines 67536 67547 +11
Branches 11181 11184 +3
====================================================================
Hits 27157 27157
- Misses 37890 37901 +11
Partials 2489 2489 ☔ View full report in Codecov by Sentry. |
Generated by 🚫 Danger |
Generated by 🚫 dangerJS |
I've tweaked the dual avatar sizes and updated the alignment (ref p1707316051751449/1707227233.708549-slack-C06BWNSR02K) with 7d29468 |
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.
The code is sensible, given the current constraints. I tested this on a Pixel 3a (physical device) and it is working as described.
Nice work Antonis!
synchronized (mSyncLock) { | ||
JSONArray bodyArray = mNoteJSON.optJSONArray("body"); | ||
if (bodyArray != null && bodyArray.length() > 0) { | ||
ArrayList<String> iconUrls = new ArrayList<>(); | ||
for (int i = 0; i < bodyArray.length(); i++) { | ||
String iconUrl = JSONUtils.queryJSON(bodyArray, "body[" + i + "].media[0].url", ""); | ||
if (iconUrl != null && !iconUrl.isEmpty()) { | ||
iconUrls.add(iconUrl); | ||
} | ||
} | ||
return iconUrls; | ||
} | ||
} | ||
return null; |
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.
This ad-hoc parsing seems reasonable for now, given that this whole file is due for refactoring to Room / FluxC (i.e. it likely isn't worth refactoring in piecemeal).
Fixes #20039
Description
This PR adds multiple avatars for multiple post or comment likes and multiple subscribers
To Test:
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist: