Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the back stack of visited pages before exiting from app #398

Open
RohanBh opened this issue Feb 15, 2018 · 18 comments · May be fixed by #3996
Open

Save the back stack of visited pages before exiting from app #398

RohanBh opened this issue Feb 15, 2018 · 18 comments · May be fixed by #3996

Comments

@RohanBh
Copy link
Contributor

RohanBh commented Feb 15, 2018

Currently, the back stack of pages is lost when the app is restarted. Chrome on Android remembers the order of visited pages if same happens to it. This must be the expected behavior.

Would you like to work on it?
Yes

@mhutti1
Copy link
Contributor

mhutti1 commented Feb 15, 2018

Sounds good I would cap it at a certain distance though. Try playing around and working out what might be best.

@stale
Copy link

stale bot commented Jun 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@stale stale bot added the stale label Jun 26, 2019
@stale stale bot removed the stale label Feb 24, 2020
@stale
Copy link

stale bot commented Apr 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@kelson42
Copy link
Collaborator

kelson42 commented Apr 12, 2021

Per default it shoudl open with the same tabs (and not the library), but this behaviour should be driven by a new settings: "remember open tabs when existing"

EDIT: forget this comment

@stale stale bot removed the stale label Apr 12, 2021
@gouri-panda
Copy link
Collaborator

gouri-panda commented Apr 12, 2021

"remember open tabs when existing"

@kelson42 Isn't this ticket about remembering the back stack of pages?

@s-ayush2903
Copy link
Contributor

Why does it sound like dupe of #2582 or vice-versa

@kelson42
Copy link
Collaborator

@s-ayush2903 Indeed! Closing

@stale
Copy link

stale bot commented Jun 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@stale stale bot added the stale label Jun 16, 2021
@rishujam
Copy link

Currently, we are using the inbuilt functions of webview for going forward and backwards. So in order to maintain a backstack we have to make our own manager which saves the pages while moving to the next pages right? Or do we have to do it any other way?

@kelson42
Copy link
Collaborator

@rishujam Assuming #3042, the we should just have an import/export feature tomRoom DB (we should wait that new Room DAO to be merged).

@kelson42 kelson42 added this to the 3.10.0 milestone Aug 29, 2023
@Saifuddin53
Copy link

@Kelson, I need some clarifications to get started on this issue.

Should the solution only focus on saving and restoring the in-article back/forward navigation history, or is the goal to preserve both, the history of visited articles and the internal navigation?

Currently, the forward and backward navigation history within an article relies on WebView history ( #3042 ), which is lost when the app restarts. Should the plan be to store this unified list of visited articles/pages in the Room database to ensure persistence across sessions?

@kelson42
Copy link
Collaborator

At this stage this is only about saving/restoring the navigation history. But restoring tabs will come next, so you should save the history for each tab separatly. Yes, Room should be used for that.

@kelson42 kelson42 modified the milestones: 3.15.0, 3.12.0 Sep 6, 2024
@kelson42
Copy link
Collaborator

kelson42 commented Sep 6, 2024

@Saifuddin53 Requirements all all clear to you? Have you been able to make progresses?

@Saifuddin53
Copy link

Saifuddin53 commented Sep 6, 2024

Yes @kelson42 all clear and have started working on it.

@MohitMaliFtechiz
Copy link
Collaborator

@Saifuddin53 Any update on this? if you need any help on this then let me know.

@Saifuddin53
Copy link

@MohitMaliFtechiz Sir, I am going to store the WebBackForwardList in Room, and then when the reader is opened, I will split it into back and forward lists. After that, I'll restore the web history based on these lists. Let me know if this approach sounds good or if there's anything you'd suggest!

@MohitMaliFtechiz
Copy link
Collaborator

Are you saving the WebBackForwardList in the room database on every page load? Please make sure to store the latest history in the database. Once your work is done open a PR so that we can review your work.

@Saifuddin53
Copy link

Are you saving the WebBackForwardList in the room database on every page load?

I will store the WebBackForwardList in the Room database when the reader fragment's onPause() is called, and on onResume(), I will retrieve the list and restore the history. And once it's done, I'll open a PR for review.

@kelson42 kelson42 modified the milestones: 3.12.0, 3.13.0 Oct 31, 2024
@kelson42 kelson42 modified the milestones: 3.13.0, 3.12.1 Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants