ML-188: guard PubSub record updates during edit mode
Add live_action guard to handle_info({:update, record}) in both
CollectionLive.Show and WishlistLive.Show. When the user is editing,
background worker updates are skipped and a warning toast is shown
instead of overwriting the socket. Normal show-mode updates and
mismatched-ID no-ops are unchanged.
6 tests added covering all three code paths.
This commit is contained in:
@@ -2556,3 +2556,9 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "ISO format"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/collection_live/show.ex
|
||||
#: lib/music_library_web/live/wishlist_live/show.ex
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record was updated in the background. Your edits may be stale — save and re-open to see the latest data."
|
||||
msgstr ""
|
||||
|
||||
Reference in New Issue
Block a user