mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-07-02 19:08:27 +00:00
Fix browser back button to restore scroll state
Removes the url parameter that was used to identify the card to scroll to and instead use the id from the internal model.
This commit is contained in:
@ -31,6 +31,7 @@ import Page.UserSettings.Data
|
||||
import Page.UserSettings.Update
|
||||
import Ports
|
||||
import Url
|
||||
import Util.Maybe
|
||||
import Util.Update
|
||||
|
||||
|
||||
@ -312,8 +313,8 @@ updateHome lmsg model =
|
||||
let
|
||||
mid =
|
||||
case model.page of
|
||||
HomePage x ->
|
||||
x
|
||||
HomePage ->
|
||||
Util.Maybe.fromString model.itemDetailModel.detail.item.id
|
||||
|
||||
_ ->
|
||||
Nothing
|
||||
@ -348,7 +349,7 @@ initPage model_ page =
|
||||
{ model_ | page = page }
|
||||
in
|
||||
case page of
|
||||
HomePage _ ->
|
||||
HomePage ->
|
||||
Util.Update.andThen2
|
||||
[ updateHome Page.Home.Data.Init
|
||||
, updateQueue Page.Queue.Data.StopRefresh
|
||||
|
Reference in New Issue
Block a user