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

Remember Reading Position #66

Open
Wiredframe opened this issue Jan 28, 2022 · 9 comments
Open

Remember Reading Position #66

Wiredframe opened this issue Jan 28, 2022 · 9 comments

Comments

@Wiredframe
Copy link

This little app is perfect for my needs. Just one thing that I'd like to suggest. Would it be possible to remember reading positions when reopening a comic book?

Thanks! 👍

@nickv2002
Copy link
Collaborator

Good feature request. Thanks!

@TehGerg
Copy link

TehGerg commented Apr 18, 2022

I had been about to ask for that. It was one of my favorite features on the original. It automatically opened windows that were open when the app was exited, and in the same positions. If that's not possible, how about the ability to add bookmarks?

@nickv2002
Copy link
Collaborator

@TehGerg – New window memory was behavior an intended change. The app now follows the system setting. See #62 (comment) for more details on how to change it.

@nickv2002 nickv2002 reopened this Apr 18, 2022
@hsulin
Copy link

hsulin commented May 5, 2022

+1 remember reading positions

@DavidPhillipOster
Copy link

Can you give a more detailed bug report? I can't reproduce this problem. When Simple Comics is in the /Applications folder or a subfolder, it keeps a Core Data database of previous books, and their reading positions. For me, when I re-open Simple Comic, I get the previous books open in their previous window positions in their previous pages.

@hsulin
Copy link

hsulin commented Jun 5, 2022

When I use command + W close the window of a comic.zip file, and then re-open it, Simple Comics starts from the very beginning, without remembering the previous reading position. (Of course, using command + Q is another case, it then keeps the reading position.)

I think it may be not a bug. It just misses the feature.

@DavidPhillipOster
Copy link

I can reproduce this. Related: If I open a .cbz file, then use the open or Find Recent to open it again, it opens another window with a second copy.

The app's Core Data database has all the info to do the correct thing, since that's what happens on launch. But that's not what happens on open, not at launch.

@nickv2002
Copy link
Collaborator

As an optional enhancement the app could be modified to always open a comic where it was closed. (I actually use similar behavior from IINA for video files.) That's the purpose of this open PR.

However, there is some amount of state-resumption already built in to Simple Comic, as David and I have mentioned above. For details on how that works see detailed info in this earlier issue #62 (comment)

@DavidPhillipOster
Copy link

I dug into this a bit. When you open the app by clicking on its icon,
SimpleComicAppDelegate's applicationDidFinishLaunching: is called by the OS, which calls [self sessionRelaunch]
that makes a core data request for active sessions, and re-creates windows, scrolled to the correct page and zoom levels, for those sessions.

When you use the open dialog box, or the recent files menu, or click on a document in Finder, the OS indirectly calls SimpleComicAppDelegate's newSessionWithFileURLs: , which makes a new TSSTManagedSession for each file URL.
The fix is: in newSessionWithFileURLs: should compare the list of fileURLS with the core data request-result for active sessions, not open the same document twice, and restore sessions matching fileURLs, creating new sessions only when there is no previous session for that fileURL to restore.

This will interact with the "close windows when quitting an application" preference that #62 (comment) takes about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants