sufone / qawl

đź“– Quran Reader for Linux, Windows, macOS
https://qawl.app
GNU Affero General Public License v3.0
79 stars 11 forks source link

Page reading history #23

Open mr-islam opened 3 years ago

mr-islam commented 3 years ago

Like implemented in old Qawl

Todo:

mr-islam commented 3 years ago

a derived store can't be used like this, so should use a custom method for setting inputPage which sets the current value as another store value previousPage

this previousPage can be used to set inputPage when this feature (go to last page) is used

mr-islam commented 3 years ago

Should've spent more time reading the docs properly before fooling around…

image

mr-islam commented 3 years ago

Don't know what I was thinking before, this feature is way more complicated than I imagined, or what I remembered from the previous version of Qawl:

It basically needs to be manually crafted into all the other navigation methods (except simple page flips, because that's redundant), saving the previous used value to a store before any new value is set:

Manually building this separate feature (quick return) into every other method of navigation feels like bad practice, that there should be a simple method for a custom store that sets this other previousPage store

Typing it out makes it seem very good, so I'll try out a custom store… if that fails, I'll manually code it in like I did for the old Qawl

mr-islam commented 3 years ago

Doing it the store way is honestly beyond me, sadly… I looked at the docs and some libraries and demos (this one stands out), but I don't think I have the time to learn all that and try. Simple stuff wins :P

mr-islam commented 3 years ago

As discussed in #65, instead of a binary jump between the current and previous read page, providing a full reading history (or at least a sane limit like 10) will give users a much better experience. Maybe some part of that shortcut can take users directly to the previous page too

Should be easier to think about and implement this feature now too

mr-islam commented 3 years ago

Can integrate the history with the desktop icon shortcut (as in, right click on windows taskbar icon and see direct actions in the app). But can that be set dynamically (as in not during build)?