add click to copy to quotes-ru widget
This commit is contained in:
@@ -11,8 +11,14 @@ function on_alarm()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function on_network_result(result)
|
function on_network_result(result)
|
||||||
local quote = ajson:get_value(result, "object string:quoteText")
|
quote = ajson:get_value(result, "object string:quoteText")
|
||||||
local author = ajson:get_value(result, "object string:quoteAuthor")
|
author = ajson:get_value(result, "object string:quoteAuthor")
|
||||||
|
|
||||||
ui:show_lines({ quote }, { author })
|
ui:show_lines({ quote }, { author })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function on_click()
|
||||||
|
if quote ~= nil then
|
||||||
|
system:copy_to_clipboard(quote)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user