feat(reactions): undo reactions/reposts, expanded catalog, adaptive recent list#192
Merged
Merged
Conversation
- Tap an already-reacted emoji to instantly un-react (NIP-09 kind-5 deletion) - "Undo Repost" destructive option in the repost popover menu (NIP-09 kind-5 deletion) - Both undos update local engagement counts immediately before the network call - Reactor struct now carries reactionEventId (populated after signing or on relay ingest) - EngagementCounts.reposterEventIds maps pubkey → kind-6 event ID for repost undo - DeletionSender gains deleteById() helper for undo flows (no full NostrEvent needed) - ReactionSender/RepostSender gain clearSent() so user can re-react/repost after undoing
Adds recent Emoji 13–15 additions across all categories: faces, hand gestures, animals (jellyfish, phoenix, moose), food, activities, travel, and objects. Ensures the full library sheet covers the complete current Unicode emoji set.
…sync Previously the quick-reaction picker required manual curation — tapping the + button to add each emoji individually. Now the picker adapts automatically: - recordUse() auto-adds any reacted emoji to the quick list on first use. The existing frequency sort ensures often-used emojis rise to the top over time, while rarely-used ones stay near the bottom where they can be long-pressed to remove them. - The quick list and frequency map are included in the NIP-78 kind-30078 settings payload (quickReactions + emojiFrequency fields) so the adapted list syncs across devices via the cross-device settings sync introduced in feat/nip78-settings-sync. - addToQuickList / removeFromQuickList trigger a debounced settings sync so manual edits also propagate. setQuickList (used by applyRestored) and the new setFrequency helper skip the sync trigger — the restore caller already suppresses the publish loop.
d86fd8a to
e754996
Compare
…h popover arrow material
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three improvements to the emoji reaction experience, built on top of the NIP-78 cross-device settings sync branch so the adaptive quick list syncs across devices automatically.
Implementation notes
DeletionSender.deleteById()— new helper for undo flows when only the event ID is known.EngagementCounts.reposterEventIds— maps pubkey → kind-6 event ID so repost undo knows which event to delete.Reactor.reactionEventId— populated after signing or on relay ingest for reaction undo.ReactionSender.clearSent()/RepostSender.clearSent()— reset local sent-state so re-reacting/reposting works after an undo.EmojiRepository.setFrequency(_:)— restore-only setter that skips the sync trigger.showRemoveReactionMenupopover (same pattern as repost) rather than an inline button, preventing accidental dismissal from triggering removal.EmojiReactionPickerno longer carries aScrollViewormaxGridHeightparameter — fixed grid + pinned footer eliminates the scroll-hides-plus-button problem.Test plan