re-add format parameter.
This broke custom formats in the date widget.
This commit is contained in:
parent
750532a1d8
commit
1cfa040fbd
5
init.lua
5
init.lua
|
@ -85,14 +85,15 @@ local function update(widget, reg, disablecache)
|
|||
if reg.wtype.async then
|
||||
if not reg.lock then
|
||||
reg.lock = true
|
||||
return reg.wtype.async(reg.warg,
|
||||
return reg.wtype.async(reg.format,
|
||||
reg.warg,
|
||||
function(data)
|
||||
update_value(format_data(data), t, c)
|
||||
reg.lock=false
|
||||
end)
|
||||
end
|
||||
else
|
||||
return update_value(format_data(reg.wtype(nil, reg.warg)), t, c)
|
||||
return update_value(format_data(reg.wtype(reg.format, reg.warg)), t, c)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ local pkg_all = {}
|
|||
|
||||
|
||||
-- {{{ Packages widget type
|
||||
function pkg_all.async(warg, callback)
|
||||
function pkg_all.async(format, warg, callback)
|
||||
if not warg then return end
|
||||
|
||||
-- Initialize counters
|
||||
|
@ -55,7 +55,7 @@ end
|
|||
local function worker(format, warg)
|
||||
local ret = nil
|
||||
|
||||
pkg_all.async(warg, function(data) ret = data end)
|
||||
pkg_all.async(format, warg, function(data) ret = data end)
|
||||
|
||||
while ret==nil do end
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue