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) ...@@ -187,9 +187,9 @@ performAction p@{ openNodes: (_ /\ setOpenNodes)
performAction { reload: (_ /\ setReload) performAction { reload: (_ /\ setReload)
, session , session
, tasks: { onTaskAdd } , tasks: { onTaskAdd }
, tree: (NTree (LNode {id}) _) } (SearchQuery task) = do , tree: (NTree (LNode {id}) _) } (DoSearch task) = do
liftEffect $ onTaskAdd task liftEffect $ onTaskAdd task
liftEffect $ log2 "[performAction] SearchQuery task:" task liftEffect $ log2 "[performAction] DoSearch task:" task
performAction { reload: (_ /\ setReload) performAction { reload: (_ /\ setReload)
, session , session
......
...@@ -19,7 +19,7 @@ data Action = AddNode String GT.NodeType ...@@ -19,7 +19,7 @@ data Action = AddNode String GT.NodeType
| DeleteNode | DeleteNode
| UpdateNode GT.AsyncTaskWithType | UpdateNode GT.AsyncTaskWithType
| RenameNode String | RenameNode String
| SearchQuery GT.AsyncTaskWithType | DoSearch GT.AsyncTaskWithType
| UploadFile GT.NodeType FileType (Maybe String) UploadFileContents | UploadFile GT.NodeType FileType (Maybe String) UploadFileContents
| RefreshTree | RefreshTree
| ShareNode String | ShareNode String
...@@ -31,7 +31,7 @@ instance showShow :: Show Action where ...@@ -31,7 +31,7 @@ instance showShow :: Show Action where
show (ShareNode _) = "ShareNode" show (ShareNode _) = "ShareNode"
show (UpdateNode _) = "UpdateNode" show (UpdateNode _) = "UpdateNode"
show (RenameNode _) = "RenameNode" show (RenameNode _) = "RenameNode"
show (SearchQuery _) = "SearchQuery" show (DoSearch _) = "SearchQuery"
show (AddNode _ _) = "AddNode" show (AddNode _ _) = "AddNode"
show (UploadFile _ _ _ _)= "UploadFile" show (UploadFile _ _ _ _)= "UploadFile"
...@@ -51,7 +51,7 @@ text DeleteNode = "Delete !" ...@@ -51,7 +51,7 @@ text DeleteNode = "Delete !"
text (AddNode _ _) = "Add !" text (AddNode _ _) = "Add !"
text (UpdateNode _) = "Update !" text (UpdateNode _) = "Update !"
text (RenameNode _) = "Rename !" text (RenameNode _) = "Rename !"
text (SearchQuery _) = "Launch search !" text (DoSearch _) = "Launch search !"
text (UploadFile _ _ _ _)= "Upload File !" text (UploadFile _ _ _ _)= "Upload File !"
text RefreshTree = "Refresh Tree !" text RefreshTree = "Refresh Tree !"
text (ShareNode _) = "Share !" text (ShareNode _) = "Share !"
......
...@@ -625,7 +625,7 @@ actionSearch search session dispatch nodePopup = ...@@ -625,7 +625,7 @@ actionSearch search session dispatch nodePopup =
-> GT.AsyncTaskWithType -> GT.AsyncTaskWithType
-> Effect Unit -> Effect Unit
searchOn dispatch p task = do searchOn dispatch p task = do
_ <- launchAff $ dispatch (SearchQuery task) _ <- launchAff $ dispatch (DoSearch task)
-- close popup -- close popup
-- TODO -- TODO
--snd p $ const Nothing --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