From 6639625c1e24e764692ec9d65939ff9ef50d76df Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 7 Feb 2022 13:43:47 +0100 Subject: Rename application functions --- editor/actions/add_page.ml | 4 ++-- editor/actions/delete_page.ml | 4 ++-- editor/actions/editor_actions.ml | 4 ++-- editor/actions/export.ml | 4 ++-- editor/actions/import.ml | 4 ++-- editor/actions/load_page.ml | 2 +- editor/actions/to_markdown.ml | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) (limited to 'editor/actions') diff --git a/editor/actions/add_page.ml b/editor/actions/add_page.ml index 1da8e3f..dff2c2f 100755 --- a/editor/actions/add_page.ml +++ b/editor/actions/add_page.ml @@ -10,7 +10,7 @@ module M = struct = fun title -> title - let update + let process : t -> State.t -> State.t = fun {title} state -> let page_id = key_of_title title in @@ -36,7 +36,7 @@ let create () in Note.E.map - (fun v -> App.ev (module M) v) + (fun v -> App.dispatch (module M) v) (* Option.on_some trigger the event only when the pop up is validated. Closing the popup doesn't do anything. *) diff --git a/editor/actions/delete_page.ml b/editor/actions/delete_page.ml index 858f6b9..2b75b2e 100755 --- a/editor/actions/delete_page.ml +++ b/editor/actions/delete_page.ml @@ -3,7 +3,7 @@ module M = struct type t = unit - let update + let process : t -> State.t -> State.t = fun () state -> match state.page_id with @@ -27,5 +27,5 @@ let create () in Note.E.map - (fun v -> App.ev (module M) v) + (fun v -> App.dispatch (module M) v) (Note.E.Option.on_some ev) diff --git a/editor/actions/editor_actions.ml b/editor/actions/editor_actions.ml index 8ff2cab..eadf1e7 100755 --- a/editor/actions/editor_actions.ml +++ b/editor/actions/editor_actions.ml @@ -125,14 +125,14 @@ let build Note.E.select [ Evr.on_el Ev.click - (fun _ -> App.ev (module Load_page.M) None) + (fun _ -> App.dispatch (module Load_page.M) None) home_button ; Evr.on_el Ev.click (fun ev -> let el = Jv.Id.of_jv @@ Jv.Id.to_jv @@ Ev.target ev in let name = El.at note_id_attribute el in - App.ev (module Load_page.M) name) + App.dispatch (module Load_page.M) name) ul ] in let childs = diff --git a/editor/actions/export.ml b/editor/actions/export.ml index ea4f8ce..27c6a26 100755 --- a/editor/actions/export.ml +++ b/editor/actions/export.ml @@ -5,7 +5,7 @@ module M = struct type t = unit - let update + let process : t -> State.t -> State.t = fun _ state -> @@ -33,4 +33,4 @@ end (** Create a new element *) let create : unit -> App.event - = fun () -> App.ev (module M) () + = fun () -> App.dispatch (module M) () diff --git a/editor/actions/import.ml b/editor/actions/import.ml index da74b50..b87960b 100755 --- a/editor/actions/import.ml +++ b/editor/actions/import.ml @@ -21,7 +21,7 @@ module M = struct type t = Forms.Selector.t - let update + let process : t -> State.t -> State.t = fun t state -> match t.Forms.Selector.file with @@ -54,5 +54,5 @@ let create () = in Note.E.map - (fun v -> App.ev (module M) v) + (fun v -> App.dispatch (module M) v) (Note.E.Option.on_some ev) diff --git a/editor/actions/load_page.ml b/editor/actions/load_page.ml index bcce51c..e85f8b5 100755 --- a/editor/actions/load_page.ml +++ b/editor/actions/load_page.ml @@ -2,7 +2,7 @@ module M = struct type t = Jstr.t option - let update + let process : t -> State.t -> State.t = fun page_id state -> State.load_page page_id state diff --git a/editor/actions/to_markdown.ml b/editor/actions/to_markdown.ml index f3c6517..1920219 100755 --- a/editor/actions/to_markdown.ml +++ b/editor/actions/to_markdown.ml @@ -246,7 +246,7 @@ module ToMarkdown = struct type t = PM.t - let update + let process : t -> State.t -> State.t = fun pm state -> @@ -291,4 +291,4 @@ end let create : PM.t -> App.event = fun pm -> - App.ev (module ToMarkdown) pm + App.dispatch (module ToMarkdown) pm -- cgit v1.2.3