Skip to content

[touchmenu] simplify code and finish early#14113

Merged
Frenzie merged 3 commits into
masterfrom
unknown repository
Jul 30, 2025
Merged

[touchmenu] simplify code and finish early#14113
Frenzie merged 3 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jul 30, 2025

Copy link
Copy Markdown

While fixing 83c27f1 I found the logic in the touchmenu code has some room for improvement.

This is my proposal for a more readable and structured code.

Also, drop the superfluous checks if something named xxx_func is really a function. (If it would not be a function, I would consider this a typo)


This change is Reviewable

Comment thread frontend/ui/widget/touchmenu.lua Outdated
@hius07

hius07 commented Jul 30, 2025

Copy link
Copy Markdown
Member

Looks good.

@ghost ghost marked this pull request as ready for review July 30, 2025 07:08
@Frenzie Frenzie requested a review from NiLuJe July 30, 2025 08:30
@Frenzie

Frenzie commented Jul 30, 2025

Copy link
Copy Markdown
Member

Also, drop the superfluous checks if something named xxx_func is really a function. (If it would not be a function, I would consider this a typo)

It would seem I added one of those but I can't remember why. 🤔 Presumably I simply copied it from another part of the code.

@NiLuJe NiLuJe left a comment

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.

:lgtm:

Reviewed 4 of 5 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @hius07)

@Frenzie Frenzie added this to the 2025.06 milestone Jul 30, 2025
@Frenzie Frenzie merged commit 400c774 into koreader:master Jul 30, 2025
4 of 5 checks passed
@ghost ghost deleted the simlifyMenuCode branch July 30, 2025 15:31
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.

3 participants