Makes the first history position reloadable #116
No reviewers
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#116
Loading…
Reference in New Issue
No description provided.
Delete Branch "refresh-first-pg"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As stated in issue #109 , if a user is on the first history location (whatever their home page is set to most likely) reload was not working. This is because as part of reload it navigates backward and does a little trick to load the page again without losing forward history. However, moving backward into nothing is not possible.
To fix this I manually check to see that we are on the first history location, then manually move the location backward by one in order to make it possible to visit the url again and have it load to the same history slot. It sounds more complicated than it is.
It does sound complicated!
I've checked this now and found that it is still possible to get the message "You are already at the beginning of history" when reloading a page.
It is working correctly otherwise. For example, the following succeeds:
I might get a chance to look deeper in to this later on.
Good catch! I hadnt thought about that. I was using the history length (as defined by the pages struct) as the guide-point for when to do a special handling case. I really needed to do it based on position within history instead. I have updated the code. Initial testing seems to show it working right, but I would appreciate it if you dont mind rerunning yours again just to double check.
Tested again, was unable to reproduce the issue 👍