[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>.
This commit is contained in:
Frans de Jonge
2019-08-31 12:43:19 +02:00
committed by GitHub
parent 258b13d344
commit 37bab4fe89
2 changed files with 4 additions and 2 deletions

View File

@@ -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,
},

View File

@@ -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,
},