add click to copy to quotes-ru widget

This commit is contained in:
Evgeny
2021-08-26 16:08:43 +03:00
parent 774fe9e955
commit 137df9cca3

View File

@@ -11,8 +11,14 @@ function on_alarm()
end
function on_network_result(result)
local quote = ajson:get_value(result, "object string:quoteText")
local author = ajson:get_value(result, "object string:quoteAuthor")
quote = ajson:get_value(result, "object string:quoteText")
author = ajson:get_value(result, "object string:quoteAuthor")
ui:show_lines({ quote }, { author })
end
function on_click()
if quote ~= nil then
system:copy_to_clipboard(quote)
end
end