Skip to content

Fix recents not refreshing on clear-all, and pending keys surviving a clear - #2696

Open
MiMoHo wants to merge 1 commit into
HeliBorg:remove_recentsfrom
MiMoHo:fix-2603-rework-recents-clear
Open

Fix recents not refreshing on clear-all, and pending keys surviving a clear#2696
MiMoHo wants to merge 1 commit into
HeliBorg:remove_recentsfrom
MiMoHo:fix-2603-rework-recents-clear

Conversation

@MiMoHo

@MiMoHo MiMoHo commented Jul 24, 2026

Copy link
Copy Markdown

On the remove_recents rework, clearRecentKeys() clears RecentEmojis and the grid but never tells the view to refresh, so long-pressing the recents tab icon leaves the now-empty grid on screen until the tab is switched. notifyItemChanged does not rebind the currently visible ViewPager2 page, so refresh the visible recents page's inner adapter directly, mirroring the tab-change path in onViewDetachedFromWindow.

removeAllKeys() also cleared mGridKeys but not mPendingKeys, so an emoji typed while viewing the recents tab survived a clear-all and was re-added by the next flushPendingRecentKeys(). Clear pending keys too.

Tested on-device.

… clear

On the remove_recents rework, clearRecentKeys() clears RecentEmojis and the grid
but never tells the view to refresh, so long-pressing the recents tab icon leaves
the now-empty grid on screen until the tab is switched. notifyItemChanged does not
rebind the currently visible ViewPager2 page, so refresh the visible recents page's
inner adapter directly, mirroring the tab-change path in onViewDetachedFromWindow.

removeAllKeys() also cleared mGridKeys but not mPendingKeys, so an emoji typed while
viewing the recents tab survived a clear-all and was re-added by the next
flushPendingRecentKeys(). Clear pending keys too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant