[fix] Pass plain link to link:onGotoLink (#5286)

Internal links carry more baggage than external ones.

See <https://github.com/koreader/koreader/pull/5282#issuecomment-526813719>.
pull/5287/head
Frans de Jonge 5 years ago committed by GitHub
parent 258b13d344
commit 37bab4fe89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -861,7 +861,8 @@ function ReaderHighlight:onHoldRelease()
{ {
text = _("Follow Link"), text = _("Follow Link"),
callback = function() callback = function()
self.ui.link:onGotoLink(self.selected_link) local link = self.selected_link.link or self.selected_link
self.ui.link:onGotoLink(link)
self:onClose() self:onClose()
end, end,
}, },

@ -457,8 +457,9 @@ function DictQuickLookup:update()
UIManager:close(self) UIManager:close(self)
self:lookupWikipedia() self:lookupWikipedia()
else else
local link = self.selected_link.link or self.selected_link
self.ui.link:onGotoLink(link)
self:onClose() self:onClose()
self.ui.link:onGotoLink(self.selected_link)
end end
end, end,
}, },

Loading…
Cancel
Save