only add non-free text reactions to recent

This commit is contained in:
Henry Hiles 2026-09-29 21:40:08 -04:00
commit 93b832839b
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
4 changed files with 25 additions and 20 deletions

View file

@ -21,12 +21,15 @@ class const EmojiPicker({
.watch(upstream.EmojiController.provider)
.betterWhen(
data: (categories) => upstream.EmojiPicker(
onSelection: (emoji) async {
onSelection: (emoji, isFreeText) async {
await onSelection(emoji);
await ref
.watch(RecentEmojiController.provider.notifier)
.add(emoji)
.onError(showError);
if (!isFreeText) {
await ref
.watch(RecentEmojiController.provider.notifier)
.add(emoji)
.onError(showError);
}
},
allowFreeText: allowFreeText,
prependCategories: .new([