Commit 740e7237 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[REFACT|Types] type name conflict (search and action)

parent 8096c7db
......@@ -187,9 +187,9 @@ performAction p@{ openNodes: (_ /\ setOpenNodes)
performAction { reload: (_ /\ setReload)
, session
, tasks: { onTaskAdd }
, tree: (NTree (LNode {id}) _) } (SearchQuery task) = do
, tree: (NTree (LNode {id}) _) } (DoSearch task) = do
liftEffect $ onTaskAdd task
liftEffect $ log2 "[performAction] SearchQuery task:" task
liftEffect $ log2 "[performAction] DoSearch task:" task
performAction { reload: (_ /\ setReload)
, session
......
......@@ -19,7 +19,7 @@ data Action = AddNode String GT.NodeType
| DeleteNode
| UpdateNode GT.AsyncTaskWithType
| RenameNode String
| SearchQuery GT.AsyncTaskWithType
| DoSearch GT.AsyncTaskWithType
| UploadFile GT.NodeType FileType (Maybe String) UploadFileContents
| RefreshTree
| ShareNode String
......@@ -31,7 +31,7 @@ instance showShow :: Show Action where
show (ShareNode _) = "ShareNode"
show (UpdateNode _) = "UpdateNode"
show (RenameNode _) = "RenameNode"
show (SearchQuery _) = "SearchQuery"
show (DoSearch _) = "SearchQuery"
show (AddNode _ _) = "AddNode"
show (UploadFile _ _ _ _)= "UploadFile"
......@@ -51,7 +51,7 @@ text DeleteNode = "Delete !"
text (AddNode _ _) = "Add !"
text (UpdateNode _) = "Update !"
text (RenameNode _) = "Rename !"
text (SearchQuery _) = "Launch search !"
text (DoSearch _) = "Launch search !"
text (UploadFile _ _ _ _)= "Upload File !"
text RefreshTree = "Refresh Tree !"
text (ShareNode _) = "Share !"
......
......@@ -625,7 +625,7 @@ actionSearch search session dispatch nodePopup =
-> GT.AsyncTaskWithType
-> Effect Unit
searchOn dispatch p task = do
_ <- launchAff $ dispatch (SearchQuery task)
_ <- launchAff $ dispatch (DoSearch task)
-- close popup
-- TODO
--snd p $ const Nothing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment