mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-29 23:27:44 +00:00
The synced settings (reaction row, reaction emojis, zap amounts, bottom bar, ...) only exist as the encrypted NIP-78 event, so memory holds the defaults until that event is decrypted. At startup it was decrypted once: - If that failed (Amber refuses to decrypt in the background when a push wakes the app, a bunker still connecting), nothing retried, and the collector skipped the same event because it already was the backup. The account ran on the defaults, and the next settings change published them over everything the user had set. - If it finished late, it overwrote a newer version that had arrived from a relay in the meantime, and the next publish rolled that back. AppSpecificState now loads every version through one collectLatest path that retries failed decrypts, never applies a version older than the one in memory, and before publishing on top of the defaults reads the saved version and lays the edit over it (or refuses to publish if it still can't). The reactions screen also applied edits on the multi-threaded signer pool, so quick toggles could land out of order, and its drag detector kept the callbacks of its first composition, so a drag after a toggle could undo it. Edits now apply on the caller's thread like the bottom-bar picker, and the drag reads the latest callbacks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AMdJVH9ReREheFeB62VD6T