Update google search app widget
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
-- description = "AIO wrapper for the Google search app widget - open widget settings for options"
|
-- description = "AIO wrapper for the Google search app widget - open widget settings for options"
|
||||||
-- type = "widget"
|
-- type = "widget"
|
||||||
-- author = "Theodor Galanis (t.me/TheodorGalanis)"
|
-- author = "Theodor Galanis (t.me/TheodorGalanis)"
|
||||||
-- version = "2.7"
|
-- version = "2.8"
|
||||||
-- foldable = "false"
|
-- foldable = "false"
|
||||||
-- uses_app: "com.google.android.googlequicksearchbox"
|
-- uses_app = "com.google.android.googlequicksearchbox"
|
||||||
|
|
||||||
local prefs = require "prefs"
|
local prefs = require "prefs"
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ function on_alarm()
|
|||||||
end
|
end
|
||||||
mode = prefs.mode
|
mode = prefs.mode
|
||||||
indices = set_indices()
|
indices = set_indices()
|
||||||
widgets:request_updates(prefs.wid)
|
widgets:request_updates(prefs.wid, "4x1")
|
||||||
end
|
end
|
||||||
|
|
||||||
function on_app_widget_updated(bridge)
|
function on_app_widget_updated(bridge)
|
||||||
@@ -44,15 +44,15 @@ end
|
|||||||
|
|
||||||
function on_click(idx)
|
function on_click(idx)
|
||||||
if idx == indices[1] then
|
if idx == indices[1] then
|
||||||
w_bridge:click("image_4")
|
w_bridge:click("image_2")
|
||||||
elseif idx == indices[2] then
|
elseif idx == indices[2] then
|
||||||
intent:start_activity(open_weather())
|
intent:start_activity(open_weather())
|
||||||
elseif idx == indices[3] then
|
elseif idx == indices[3] then
|
||||||
w_bridge:click("image_7")
|
w_bridge:click("image_3")
|
||||||
elseif idx == indices[4] then
|
elseif idx == indices[4] then
|
||||||
w_bridge:click("image_11")
|
w_bridge:click("image_5")
|
||||||
elseif idx == indices[5] then
|
elseif idx == indices[5] then
|
||||||
w_bridge:click("image_12")
|
w_bridge:click("image_6")
|
||||||
else return
|
else return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user