mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-04 10:29:34 +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 -> ( Model, Cmd Msg, Sub Msg )
|
||||||
initPage model page =
|
initPage model_ page =
|
||||||
|
let
|
||||||
|
model =
|
||||||
|
{ model_ | page = page }
|
||||||
|
in
|
||||||
case page of
|
case page of
|
||||||
HomePage mid ->
|
HomePage _ ->
|
||||||
Util.Update.andThen2
|
Util.Update.andThen2
|
||||||
[ updateHome Page.Home.Data.Init
|
[ updateHome Page.Home.Data.Init
|
||||||
, updateQueue Page.Queue.Data.StopRefresh
|
, updateQueue Page.Queue.Data.StopRefresh
|
||||||
|
@ -26,7 +26,7 @@ update mId key flags settings msg model =
|
|||||||
Init ->
|
Init ->
|
||||||
Util.Update.andThen2
|
Util.Update.andThen2
|
||||||
[ update mId key flags settings (SearchMenuMsg Comp.SearchMenu.Init)
|
[ update mId key flags settings (SearchMenuMsg Comp.SearchMenu.Init)
|
||||||
, doSearch flags settings
|
, scrollToCard mId
|
||||||
]
|
]
|
||||||
model
|
model
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ update mId key flags settings msg model =
|
|||||||
ScrollResult _ ->
|
ScrollResult _ ->
|
||||||
let
|
let
|
||||||
cmd =
|
cmd =
|
||||||
Process.sleep 350 |> Task.perform (always ClearItemDetailId)
|
Process.sleep 800 |> Task.perform (always ClearItemDetailId)
|
||||||
in
|
in
|
||||||
withSub ( model, cmd )
|
withSub ( model, cmd )
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user