1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +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

View File

@@ -159,9 +159,7 @@ updateMain msg model session =
( model, Cmd.none ) ( model, Cmd.none )
_ -> _ ->
( applyToModelSession Session.clearFlash model ( model, Nav.pushUrl session.key (Url.toString url) )
, Nav.pushUrl session.key (Url.toString url)
)
Browser.External url -> Browser.External url ->
( model, Nav.load url ) ( model, Nav.load url )
@@ -241,7 +239,7 @@ changeRouteTo : Route -> Model -> ( Model, Cmd Msg )
changeRouteTo route model = changeRouteTo route model =
let let
session = session =
getSession model getSession model |> Session.clearFlash
newModel = newModel =
{ model | layout = Layout.reset model.layout } { model | layout = Layout.reset model.layout }