1. Small fixes to main widget. 2. Covid widget removed as defunct.

This commit is contained in:
Evgeny
2023-07-26 11:26:18 +04:00
parent 029cc39c7f
commit 7151dc73a0
8 changed files with 64 additions and 55 deletions

View File

@@ -10,11 +10,13 @@ function on_alarm()
http:get("https://api.quotable.io/random")
end
function on_network_result(result)
quote = ajson:get_value(result, "object string:content")
author = ajson:get_value(result, "object string:author")
function on_network_result(result, code)
if code >= 200 and code < 299 then
quote = ajson:get_value(result, "object string:content")
author = ajson:get_value(result, "object string:author")
ui:show_lines({ quote }, { author })
ui:show_lines({ quote }, { author })
end
end
function on_click()