Store only book specific settings per book, not global settings
https://code.google.com/p/ebookdroid/issues/detail?id=504
What steps will reproduce the problem?
- Go to file browser mode
- All settings->Rendering->Page transitions->Fade in (for example)
- Open a previously unread book
- Exit the book, and now change the global setting: All settings->Rendering->Page transitions->Slide
- Open the same book again
What is the expected output? I would expect the book to now have a page transition of 'slide", which is the global option I chose.
What do you see instead? Page transition stays "Fade in", from the first time the book was opened.
A book should only remember the book-specific settings that were set via "Book settings", not those set via "All Settings".
What version of the product are you using? 1.6.6
On what operating system? Android
What device are you using? Galaxy Note 2
Please provide any additional information below.
Has been closed for ebookdroid as "by design". I think, it's hard to make a decision here. Both behaviours have their disadvantages... Would be nice to hear more opinions on that.
The way it is now is a huge pain. If I've already opened a lot of books and I decide, for example, that I usually prefer single page view, I have to make that change manually in every single book I've previously opened. Changing global settings only affects new books. Making global preferences actually work is one way document viewer can be better than ebookdroid. How hard would it be to implement this?
Okay, you propose some kind of
Hm, even with this behavior I could think of scenarios where users are confused by this. Any other opinions?
By "tag" I assume you mean something that indicates "This setting hasn't been changed, so just use the global default". As long as the tag was per setting rather than per book, that should work.
Another idea is to not have a tag and only save the specific settings that have been changed. I believe that's the way most programs work: any preferences that haven't been changed for a book are redundant data and simply aren't saved.
Oh, I'm sorry, I just see that github removed something from my comment because it contained angle brackets. However, you got it right :)
I agree with this suggestion
-
IMO the first change to make is, at the database level, all book settings should be optional; i.e. they should be able to be NULL in SQL or simply omitted when serialized as JSON. This could be implemented as a part of https://github.com/SufficientlySecure/document-viewer/issues/220 to limit the number of database schema changes to just one. This change doesn't limit us to any particular UI design, and it would support the current behaviour of snapshotting the app settings when a book is first opened.
-
We'd need a new API for accessing book settings that resolves unset book settings by reading app settings. This should be easy, just make all BookSettings fields private and add setters/getters.
-
How exactly to expose this functionality in the UI is still an open question.
Maybe some items in the quick settings toolbar menu (fullscreen, force portrait / force landscape, single page, day/night) could apply to all books. Some of them make more sense as book settings (crop / autocrop, split pages).
The actual book settings page would need some changes if all settings have an extra "unset" state; we couldn't use switches / checkboxes any more. Not sure what the best solution is there.