File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
components/source_content Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -474,11 +474,15 @@ defmodule VyasaWeb.Content.ReadingContent do
474
474
475
475
# Helper function that syncs and mutates draft table
476
476
defp mutate_draft_table ( % { assigns: % { draft_table: % Vyasa.Sangh.Comment { } = dt , marks: marks } } = socket ) do
477
- IO . inspect ( dt , label: "DROFT" )
478
477
{ :ok , com } = Vyasa.Sangh . update_comment ( dt , % { marks: marks } )
479
478
socket
480
479
|> assign ( :draft_table , com )
481
480
end
481
+
482
+ # when session hasnt been initialised
483
+ defp mutate_draft_table ( socket ) do
484
+ socket
485
+ end
482
486
# currently naive hd lookup can be filter based on active toggle,
483
487
# tree like comments can be used to store nested collapsible topics (personal mark collection e.g.)
484
488
# currently marks merged in and swapped out probably can be singular data structure
Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ defmodule VyasaWeb.DisplayManager.DisplayLive do
38
38
}
39
39
end
40
40
41
- defp sync_session ( % { assigns: % { session: % Session { name: name , sangh: % { id: _sangh_id } } = sess } } = socket ) when is_binary ( name ) do
41
+ defp sync_session ( % { assigns: % { session: % Session { id: id , sangh: % { id: _sangh_id } } = sess } } = socket ) when is_binary ( id ) do
42
42
# currently needs name prerequisite to save
43
43
socket
44
44
|> push_event ( "initSession" , sess )
45
45
end
46
46
47
- defp sync_session ( % { assigns: % { session: % Session { name: name } = sess } } = socket ) when is_binary ( name ) do
47
+ defp sync_session ( % { assigns: % { session: % Session { id: id } = sess } } = socket ) when is_binary ( id ) do
48
48
# initialises sangh if uninitiated (didnt init at Vyasa.Session)
49
49
{ :ok , sangh } = Sangh . create_session ( )
50
50
sangh_sess = % { sess | sangh: sangh }
You can’t perform that action at this time.
0 commit comments