[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"),
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()
end,
},

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

Loading…
Cancel
Save