Skip to content

Conversation

@jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Oct 27, 2025

Content

  • Create :libraries:recentemojis and move everything related to pure fetching/modification of recent emojis there.
  • Make GetRecentEmojis remove duplicates and return only valid emojis (those that are in Emojibase).
  • Move merging recent and suggested emojis to ActionListPresenter from ActionListView, so we can test it.

Motivation and context

I was seeing some duplicate or empty emojis in my list of recent emojis. Some of them were emojis that looked the same visually but had a different representation (i.e. I had 2 green check mark ones, also in EW), but some others were being displayed blank (reactions for TWIM?).

Tests

The unit tests should be enough, but you can try testing them these values by modifying the global account data.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/HQ42Fu

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.78%. Comparing base (b664ee7) to head (f375c36).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...es/messages/impl/actionlist/ActionListPresenter.kt 80.00% 0 Missing and 1 partial ⚠️
...raries/recentemojis/impl/DefaultGetRecentEmojis.kt 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5612      +/-   ##
===========================================
+ Coverage    79.76%   79.78%   +0.01%     
===========================================
  Files         2395     2396       +1     
  Lines        65012    65020       +8     
  Branches      8262     8263       +1     
===========================================
+ Hits         51860    51873      +13     
+ Misses       10197    10191       -6     
- Partials      2955     2956       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


val emojis = remember(recentEmojis) {
(suggestedEmojis + recentEmojis.filter { it !in suggestedEmojis })
(suggestedEmojis + recentEmojis).distinct()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicer solution!

…centEmojis` there

- Make sure `GetRecentEmojis` won't return duplicate or invalid emojis.
- `ActionListPresenter` now handles merging suggested and recent emojis, not `ActionListView`.
@jmartinesp jmartinesp force-pushed the fix/display-only-valid-emojis-in-recents branch from 1ff2ff3 to 0fa66f7 Compare October 27, 2025 10:15
@jmartinesp jmartinesp added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 27, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 27, 2025
@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Oct 27, 2025
@jmartinesp jmartinesp force-pushed the fix/display-only-valid-emojis-in-recents branch from 8fcc5b2 to 3587d3e Compare October 28, 2025 09:59
@jmartinesp jmartinesp marked this pull request as ready for review October 29, 2025 08:22
@jmartinesp jmartinesp requested a review from a team as a code owner October 29, 2025 08:22
@jmartinesp jmartinesp requested review from ganfra and removed request for a team October 29, 2025 08:22
@jmartinesp jmartinesp enabled auto-merge (squash) October 30, 2025 14:56
@sonarqubecloud
Copy link

@jmartinesp jmartinesp merged commit 353c00e into develop Oct 30, 2025
29 of 30 checks passed
@jmartinesp jmartinesp deleted the fix/display-only-valid-emojis-in-recents branch October 30, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Bugfix For bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants