Skip to content

[feat] Support callback function in VirtualKeyPopup#5588

Merged
Frenzie merged 2 commits intokoreader:masterfrom
Frenzie:popup-func
Nov 11, 2019
Merged

[feat] Support callback function in VirtualKeyPopup#5588
Frenzie merged 2 commits intokoreader:masterfrom
Frenzie:popup-func

Conversation

@Frenzie
Copy link
Copy Markdown
Member

@Frenzie Frenzie commented Nov 11, 2019

Required for #5583.

@Frenzie Frenzie added this to the 2019.12 milestone Nov 11, 2019
@Frenzie Frenzie requested a review from poire-z November 11, 2019 20:25
Copy link
Copy Markdown
Contributor

@poire-z poire-z left a comment

Choose a reason for hiding this comment

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

Looks good.

local parent_key = self.parent_key
local key_chars = parent_key.key_chars
local key_char_orig = key_chars[1]
local key_char_orig_func = parent_key.callback
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's that for?

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.

The middle button responds like the original key so I figure it should do the same with a custom callback. Could also just be nil I figure.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, allright, I thought you were saving something before allowing/going to override it (that I often would name something_orig_func :)

@Frenzie Frenzie merged commit 2855fdf into koreader:master Nov 11, 2019
@Frenzie Frenzie deleted the popup-func branch November 11, 2019 22:10
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants