mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-30 03:55:07 +00:00
Fix initialising pages; improve scroll to item
This commit is contained in:
parent
2773eb5341
commit
ca05b3c195
@ -342,9 +342,13 @@ updateManageData lmsg model =
|
||||
|
||||
|
||||
initPage : Model -> Page -> ( Model, Cmd Msg, Sub Msg )
|
||||
initPage model page =
|
||||
initPage model_ page =
|
||||
let
|
||||
model =
|
||||
{ model_ | page = page }
|
||||
in
|
||||
case page of
|
||||
HomePage mid ->
|
||||
HomePage _ ->
|
||||
Util.Update.andThen2
|
||||
[ updateHome Page.Home.Data.Init
|
||||
, updateQueue Page.Queue.Data.StopRefresh
|
||||
|
@ -26,7 +26,7 @@ update mId key flags settings msg model =
|
||||
Init ->
|
||||
Util.Update.andThen2
|
||||
[ update mId key flags settings (SearchMenuMsg Comp.SearchMenu.Init)
|
||||
, doSearch flags settings
|
||||
, scrollToCard mId
|
||||
]
|
||||
model
|
||||
|
||||
@ -251,7 +251,7 @@ update mId key flags settings msg model =
|
||||
ScrollResult _ ->
|
||||
let
|
||||
cmd =
|
||||
Process.sleep 350 |> Task.perform (always ClearItemDetailId)
|
||||
Process.sleep 800 |> Task.perform (always ClearItemDetailId)
|
||||
in
|
||||
withSub ( model, cmd )
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user