[feat] Add Device:hasClipboard() (#3465)

References https://github.com/koreader/koreader/issues/3441
This commit is contained in:
Frans de Jonge
2017-11-14 19:20:58 +01:00
committed by GitHub
parent aa7d4f9751
commit 06dfe4fb78
3 changed files with 18 additions and 2 deletions

View File

@@ -383,8 +383,11 @@ function ReaderHighlight:onHoldRelease()
},
{
{
text = "-",
enabled = false,
text = "Copy",
enabled = Device:hasClipboard(),
callback = function()
Device.input.setClipboardText(self.selected_text.text)
end,
},
{
text = _("Translate"),