1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-06-18 11:13:39 +00:00

ui: Clear flash when changing routes

This commit is contained in:
James Hillyerd
2019-02-18 12:35:27 -08:00
parent 3738ccc11d
commit a54e0f2438
+2 -4
View File
@@ -159,9 +159,7 @@ updateMain msg model session =
( model, Cmd.none )
_ ->
( applyToModelSession Session.clearFlash model
, Nav.pushUrl session.key (Url.toString url)
)
( model, Nav.pushUrl session.key (Url.toString url) )
Browser.External url ->
( model, Nav.load url )
@@ -241,7 +239,7 @@ changeRouteTo : Route -> Model -> ( Model, Cmd Msg )
changeRouteTo route model =
let
session =
getSession model
getSession model |> Session.clearFlash
newModel =
{ model | layout = Layout.reset model.layout }