Add TODOs for consequences of updating records in list views
This commit is contained in:
@@ -88,6 +88,10 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
|
||||
|
||||
@impl true
|
||||
def handle_info({MusicLibraryWeb.RecordLive.FormComponent, {:saved, record}}, socket) do
|
||||
# TODO: when a record is updated, there's no guarantee that 1) it will end
|
||||
# up in the same position and 2) it would still be visible given current
|
||||
# filters. Instead of inserting into the stream, we should reload the
|
||||
# collection with the same params.
|
||||
{:noreply, stream_insert(socket, :records, record)}
|
||||
end
|
||||
|
||||
|
||||
@@ -88,6 +88,10 @@ defmodule MusicLibraryWeb.WishlistLive.Index do
|
||||
|
||||
@impl true
|
||||
def handle_info({MusicLibraryWeb.RecordLive.FormComponent, {:saved, record}}, socket) do
|
||||
# TODO: when a record is updated, there's no guarantee that 1) it will end
|
||||
# up in the same position and 2) it would still be visible given current
|
||||
# filters. Instead of inserting into the stream, we should reload the
|
||||
# wishlist with the same params.
|
||||
{:noreply, stream_insert(socket, :records, record)}
|
||||
end
|
||||
|
||||
|
||||
@@ -59,12 +59,12 @@ msgstr ""
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/collection_live/index.ex:129
|
||||
#: lib/music_library_web/live/collection_live/index.ex:136
|
||||
#: lib/music_library_web/live/collection_live/index.ex:133
|
||||
#: lib/music_library_web/live/collection_live/index.ex:140
|
||||
#: lib/music_library_web/live/stats_live/index.ex:53
|
||||
#: lib/music_library_web/live/stats_live/index.ex:59
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:128
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:135
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:132
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Error importing record"
|
||||
msgstr ""
|
||||
@@ -188,15 +188,15 @@ msgstr ""
|
||||
msgid "Purchased on"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/collection_live/index.ex:121
|
||||
#: lib/music_library_web/live/collection_live/index.ex:125
|
||||
#: lib/music_library_web/live/stats_live/index.ex:45
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:120
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:124
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record imported successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:124
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:148
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:152
|
||||
#: lib/music_library_web/live/wishlist_live/show.ex:106
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record updated successfully"
|
||||
|
||||
Reference in New Issue
Block a user