android: share text (#5745)

This commit is contained in:
Martín Fernández
2020-01-05 12:56:01 +01:00
committed by Frans de Jonge
parent 4e5779199d
commit 5ef329c19c
3 changed files with 14 additions and 0 deletions

View File

@@ -498,6 +498,17 @@ function ReaderHighlight:onShowHighlightMenu()
},
})
end
if Device:canShareText() then
table.insert(highlight_buttons, {
{
text = _("Share text"),
callback = function()
Device.doShareText(self.selected_text.text)
end,
},
})
end
self.highlight_dialog = ButtonDialog:new{
buttons = highlight_buttons,
tap_close_callback = function() self:handleEvent(Event:new("Tap")) end,