summaryrefslogtreecommitdiff
path: root/elm/VNEdit.elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-08-03 09:54:29 +0200
committerYorhel <git@yorhel.nl>2020-08-03 09:54:36 +0200
commita5204cdee31f5130330312eeaf7c31fab2504f89 (patch)
treeb08a83366516a95ed8f617c21c8a918717201638 /elm/VNEdit.elm
parent09dfb2c285dac6a5a2e505aec6d934ebbed3fce8 (diff)
Elm: Fix focus when adding autocompleted elements with mouse click
I wasn't being consistent with propagating the Cmd returned by the autocompletion module.
Diffstat (limited to 'elm/VNEdit.elm')
-rw-r--r--elm/VNEdit.elm8
1 files changed, 4 insertions, 4 deletions
diff --git a/elm/VNEdit.elm b/elm/VNEdit.elm
index 3c6f06a6..0397b492 100644
--- a/elm/VNEdit.elm
+++ b/elm/VNEdit.elm
@@ -207,7 +207,7 @@ update msg model =
Just v ->
if List.any (\l -> l.vid == v.id) model.vns
then ({ model | vnSearch = A.clear nm "" }, c)
- else ({ model | vnSearch = A.clear nm "", vns = model.vns ++ [{ vid = v.id, title = v.title, original = v.original, relation = "seq", official = True }] }, Cmd.none)
+ else ({ model | vnSearch = A.clear nm "", vns = model.vns ++ [{ vid = v.id, title = v.title, original = v.original, relation = "seq", official = True }] }, c)
AnimeDel i -> ({ model | anime = delidx i model.anime }, Cmd.none)
AnimeSearch m ->
@@ -217,7 +217,7 @@ update msg model =
Just a ->
if List.any (\l -> l.aid == a.id) model.anime
then ({ model | animeSearch = A.clear nm "" }, c)
- else ({ model | animeSearch = A.clear nm "", anime = model.anime ++ [{ aid = a.id, title = a.title, original = a.original }] }, Cmd.none)
+ else ({ model | animeSearch = A.clear nm "", anime = model.anime ++ [{ aid = a.id, title = a.title, original = a.original }] }, c)
ImageSet s b -> let (nm, nc) = Img.new b s in ({ model | image = nm }, Cmd.map ImageMsg nc)
ImageSelect -> (model, FSel.file ["image/png", "image/jpg"] ImageSelected)
@@ -231,7 +231,7 @@ update msg model =
let (nm, c, res) = A.update staffConfig m model.staffSearch
in case res of
Nothing -> ({ model | staffSearch = nm }, c)
- Just s -> ({ model | staffSearch = A.clear nm "", staff = model.staff ++ [{ id = s.id, aid = s.aid, name = s.name, original = s.original, role = "staff", note = "" }] }, Cmd.none)
+ Just s -> ({ model | staffSearch = A.clear nm "", staff = model.staff ++ [{ id = s.id, aid = s.aid, name = s.name, original = s.original, role = "staff", note = "" }] }, c)
SeiyuuDef c -> ({ model | seiyuuDef = c }, Cmd.none)
SeiyuuDel idx -> ({ model | seiyuu = delidx idx model.seiyuu }, Cmd.none)
@@ -241,7 +241,7 @@ update msg model =
let (nm, c, res) = A.update seiyuuConfig m model.seiyuuSearch
in case res of
Nothing -> ({ model | seiyuuSearch = nm }, c)
- Just s -> ({ model | seiyuuSearch = A.clear nm "", seiyuu = model.seiyuu ++ [{ id = s.id, aid = s.aid, name = s.name, original = s.original, cid = model.seiyuuDef, note = "" }] }, Cmd.none)
+ Just s -> ({ model | seiyuuSearch = A.clear nm "", seiyuu = model.seiyuu ++ [{ id = s.id, aid = s.aid, name = s.name, original = s.original, cid = model.seiyuuDef, note = "" }] }, c)
ScrUplRel s -> ({ model | scrUplRel = s }, Cmd.none)
ScrUplSel -> (model, FSel.files ["image/png", "image/jpg"] ScrUpl)