Hide details when clicked on result row again (#16)

fixes #11
This commit is contained in:
Rok Garbas 2020-05-11 14:35:19 +02:00 committed by GitHub
parent 3918246b24
commit 2a75422e90
Failed to generate hash of commit

View file

@ -126,7 +126,14 @@ update path navKey msg model =
) )
ShowDetails selected -> ShowDetails selected ->
( { model | showDetailsFor = Just selected } ( { model
| showDetailsFor =
if model.showDetailsFor == Just selected then
Nothing
else
Just selected
}
, Cmd.none , Cmd.none
) )