mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
ui: Clear flash when changing routes
This commit is contained in:
@@ -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 }
|
||||||
|
|||||||
Reference in New Issue
Block a user