[touchmenu] simplify code and finish early (#14113)

This commit is contained in:
zwim
2025-07-30 16:29:36 +02:00
committed by GitHub
parent a674bc8510
commit 400c774bcc
5 changed files with 67 additions and 81 deletions

View File

@@ -1593,7 +1593,7 @@ function ReaderLink:getButtonsForExternalLinkDialog(link_url)
local button = fn_button(self, link_url)
local show, button_title
if type(button.show_in_dialog_func) == "function" then
if button.show_in_dialog_func then
show, button_title = button.show_in_dialog_func(link_url)
else
-- If the button doesn't have the show_in_dialog_func, then assume that the button