Repository navigation
[KeyValuePage] back button returns to parent - #14270
Conversation
|
thanks. is there any way to emulate taps on << and >> buttons? |
| if self.page_return_arrow and self.callback_return ~= nil then | ||
| self:onReturn() |
There was a problem hiding this comment.
This kind of reads like it should say something like
if self.page_return_arrow and self.callback_return then
self:callback_return()?
There was a problem hiding this comment.
although the ~= nil could theoretically go, the call to self:callback_return() would mean it never gets to exit the widget, so onReturn() is correct, furthermore it does the screen cleaning as well.
edit: ignore that, it makes sense if you (unlike me) don't return early
There was a problem hiding this comment.
It looks like the weird thing was simply that if self.callback_return. With that removed it'd also have made sense since onReturn() seems to already do that check. It just read strangely as it was because it reads unrelated.
koreader/frontend/ui/widget/keyvaluepage.lua
Lines 839 to 845 in c78047b
There was a problem hiding this comment.
That being said, it's probably clearer the way it is written now, clearly indicating that a callback is used etc.
in FM yes, screenkb + page up/down , this widget, nope. I wasn't even aware of this widget, I wasn't even aware you could go multiple layer deep into the statistics |
|
I promise I haven’t been sitting on this, waiting for day 7 to dawn ;) Any further comments? @Frenzie |
fix koreader#14266, back button returns to parent
what's new
Added a new
onCloseWithKey()method that checks for a return arrow and callback before invoking the appropriate close or return logic, providing clearer behavior when closing the page via a key event.fix (kindle NT) no way to go back to previous window when inside a widget. #14266
This change is