re-add format parameter.

This broke custom formats in the date widget.
This commit is contained in:
Joerg Thalheim 2017-10-23 15:24:17 +01:00
parent 750532a1d8
commit 1cfa040fbd
2 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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