add click to copy to all quotes widget
This commit is contained in:
@@ -10,6 +10,12 @@ function on_alarm()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function on_network_result(result)
|
function on_network_result(result)
|
||||||
local joke = ajson:get_value(result, "object object:value string:joke")
|
joke = ajson:get_value(result, "object object:value string:joke")
|
||||||
ui:show_text(joke)
|
ui:show_text(joke)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function on_click()
|
||||||
|
if joke ~= nil then
|
||||||
|
system:copy_to_clipboard(joke)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
@@ -10,8 +10,14 @@ function on_alarm()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function on_network_result(result)
|
function on_network_result(result)
|
||||||
local quote = ajson:get_value(result, "object string:quote")
|
quote = ajson:get_value(result, "object string:quote")
|
||||||
local author = ajson:get_value(result, "object string:author")
|
author = ajson:get_value(result, "object string:author")
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -10,8 +10,14 @@ function on_alarm()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function on_network_result(result)
|
function on_network_result(result)
|
||||||
local quote = ajson:get_value(result, "object string:content")
|
quote = ajson:get_value(result, "object string:content")
|
||||||
local author = ajson:get_value(result, "object string:author")
|
author = ajson:get_value(result, "object string:author")
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -10,7 +10,14 @@ function on_alarm()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function on_network_result(result)
|
function on_network_result(result)
|
||||||
local setup = ajson:get_value(result, "object string:setup")
|
setup = ajson:get_value(result, "object string:setup")
|
||||||
local punchline = ajson:get_value(result, "object string:punchline")
|
punchline = ajson:get_value(result, "object string:punchline")
|
||||||
|
|
||||||
ui:show_lines({setup, punchline})
|
ui:show_lines({setup, punchline})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function on_click()
|
||||||
|
if setup ~= nil then
|
||||||
|
system:copy_to_clipboard(setup.."\n"..punchline)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user