Skip to content
Snippets Groups Projects
Commit ba67df51 authored by Damian Romano Haj-Houssin's avatar Damian Romano Haj-Houssin
Browse files

Modified MapView to set global consulate country on click (though a change of...

Modified MapView to set global consulate country on click (though a change of the global variable does currently not change the local view).
parent 026a284f
No related branches found
No related tags found
No related merge requests found
Pipeline #24399 passed
......@@ -145,8 +145,8 @@ update msg global model =
-- Set selected consulate country. Deselect if the same country was clicked again.
ConsulateCountry ->
if Just country == (model.selectedConsulate |> Maybe.map Tuple.first)
then (global, { model | selectedConsulate = Nothing }, Cmd.none) -- Deselect.
else (global, { model | selectedConsulate = Just ( country, Nothing ) }, Cmd.none) -- Select.
then ( { global | selectedConsulateCountry = Nothing }, { model | selectedConsulate = Nothing }, Cmd.none) -- Deselect.
else ( { global | selectedConsulateCountry = Just country.context.meta.iso_a2 }, { model | selectedConsulate = Just ( country, Nothing ) }, Cmd.none) -- Select.
-- Do nothing.
_ -> (global, model, Cmd.none)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment