Repository navigation
Add "Open (opened+unopened) random document" on long-press - #13160
Conversation
|
Looks good. |
|
Is there anything I can do to support this PR? It's been a month+ with no activity, whereas other PRs are getting at least some action. It's not a big change |
| function FileManager:openRandomFile(dir) | ||
| local match_func = function(file) -- documents, not yet opened | ||
| return DocumentRegistry:hasProvider(file) and not BookList.hasBookBeenOpened(file) | ||
| function FileManager:openRandomFile(dir, is_unopened) |
There was a problem hiding this comment.
I'd name it something like unopened_only or skip_opened or a variety of other things that don't imply it's a property of a file. Besides that lgtm.
There was a problem hiding this comment.
Thanks! I've updated the PR to rename the parameter
7d0c946 to
4867cb7
Compare
You could have put in on long-press and hide the "feature" a bit :) (Personally, I find this kind of "feature" a joke/toy. I missed (or forgot) the addition of the existing "Open random document". Seeing 2 crappy button in there makes me sad.) |
What do you mean exactly by a long-press here? Do you mean to display another context menu when long-pressing
It's useful to me personally, and other people as well, seeing how there were contributions to this feature previously. It shouldn't matter if the feature may not be perceived as serious, as long as it provides value / enjoyment to users (which it clearly does) |
Just have the most useful (ah ah) behaviour on tap, and the less useful on long-press, no need to advertise both. We have that in frontend (ie. Book map, long-press brings the "overview" mode).
2 years ago, some user came here with a PR that added in that same menu 3 options: The above is a fiction, but you get my idea :) We still have to do some policing work so KOReader doesn't becomre a crappy stack of features used by 2 people. Having a quick look at the code, I assume "Open random document" opens a document from the current folder (and under?), and it won't just open any random document from the library root. So, it's not as crappy as I initially thought. |
I don't disagree with you, but it's seems small and contained. And yes, it's folder-bound. |
It prompts you with the name of the document it's about to open, so you can simply skip undesired documents, so that should help with this issue |
|
I agree that the current "Open random document" button can be kept as is, and the new functionality (include opened documents) to be added to long-pressing on the button. |
46c5af7 to
1958285
Compare
|
@hius07 I've updated it |
|
You've changed the default action (on tap). |
|
@hius07 Yes, if you were to combine both actions, then I think it makes sense to change the default: opening any document would be used more often (during the same time period) compared to the unopened document. I.e. the user eventually runs out of unopened documents, so that functionality becomes used less and less On the flip side, you could be using open any document functionality several times per reading session, every session, so it doesn't make sense to prolong invoking this functionality |
He adds new books regularly. I have no personal preferences (not using this feature). Just thinking about the long time default behavior that people might be used to. |
Fair, but my point still stands that any random document has the potential to be used more often just by its nature. Software changes all the time, so I don't see how the user wouldn't adapt here as well, it's not a big change. I don't think it's logical to keep the non-optimal default behaviour just because it was introduced first. |
|
What's the old and what's the new behavior now precisely? (Or: write a commit message please ;-P) |
Before / masterOn tap: open unopened random document After / this PROn tap: open any random document |
|
What's the rationale for making the unexpected behavior the default? |
|
@Frenzie Basically because you'd use opening any doc a few times during a reading session, but unopened doc - only occasionally. And due to the nature of the Open any doc, it seems logical to make its invocation to be fastest From my comment above - opening any document would be used more often (during the same time period) compared to the unopened document. I.e. the user eventually runs out of unopened documents, so that functionality becomes used less and less On the flip side, you could be using open any document functionality several times per reading session, every session, so it doesn't make sense to prolong invoking this functionality. I don't think it's logical to keep the non-optimal default behaviour just because it was introduced first. |
|
I'm not quite convinced, but I suppose I'd really expect it to avoid the previous x results, which has some overlap with previously opened but is something quite different nonetheless. |
…y unopened document (koreader#13160)
Would help with reading texts in parallel, especially when it's difficult to decide which one to pick next :)
I've considered grouping both Random functions into a folder, but that would introduce friction with using them.
This change is