Avoid server roundtrip when switching pages

When changing pages in webui a server request should not happen. This
makes the webapp snappy again.

Issue: #508
This commit is contained in:
Eike Kettner 2020-12-15 20:20:32 +01:00
parent 398f969207
commit a987ede7c9

View File

@ -178,8 +178,11 @@ updateWithSub msg model =
page = page =
Page.fromUrl url Page.fromUrl url
|> Maybe.withDefault (defaultPage model.flags) |> Maybe.withDefault (defaultPage model.flags)
( m, c, s ) =
initPage model page
in in
( model, Page.goto page, Sub.none ) ( { m | page = page }, c, s )
ToggleNavMenu -> ToggleNavMenu ->
( { model ( { model