Skip to content

[KeyValuePage] back button returns to parent - #14270

Merged
Frenzie merged 2 commits into
koreader:masterfrom
Commodore64user:keyvalue
Sep 9, 2025
Merged

Frenzie merged 2 commits into
koreader:masterfrom
Commodore64user:keyvalue

Conversation

@Commodore64user

@Commodore64user Commodore64user commented Sep 3, 2025 •

Copy link
Copy Markdown
Member

what's new


This change is Reviewable

@zenixlabs

Copy link
Copy Markdown

thanks. is there any way to emulate taps on << and >> buttons?

Comment thread frontend/ui/widget/keyvaluepage.lua Outdated
Comment on lines +822 to +823
if self.page_return_arrow and self.callback_return ~= nil then
self:onReturn()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of reads like it should say something like

    if self.page_return_arrow and self.callback_return then
        self:callback_return()

?

@Commodore64user Commodore64user Sep 3, 2025 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

function KeyValuePage:onReturn()
if self.callback_return then
self:callback_return()
UIManager:close(self)
UIManager:setDirty(nil, "ui")
end
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That being said, it's probably clearer the way it is written now, clearly indicating that a callback is used etc.

@Commodore64user

Copy link
Copy Markdown
Member Author

thanks. is there any way to emulate taps on << and >> buttons?

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

@Commodore64user

Copy link
Copy Markdown
Member Author

I promise I haven’t been sitting on this, waiting for day 7 to dawn ;) Any further comments? @Frenzie

@Frenzie Frenzie added this to the 2025.10 milestone Sep 9, 2025
@Frenzie
Frenzie merged commit 672be80 into koreader:master Sep 9, 2025
@Commodore64user
Commodore64user deleted the keyvalue branch September 20, 2025 02:10
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(kindle NT) no way to go back to previous window when inside a widget.

3 participants