Allow widget to be a function again
This was broke by async support.
This commit is contained in:
parent
eb64e0dd3a
commit
050dbd30d3
2
init.lua
2
init.lua
|
@ -82,7 +82,7 @@ local function update(widget, reg, disablecache)
|
||||||
if c and c.time and c.data and t < c.time+reg.timer and not disablecache then
|
if c and c.time and c.data and t < c.time+reg.timer and not disablecache then
|
||||||
return update_value(format_data(c.data))
|
return update_value(format_data(c.data))
|
||||||
elseif reg.wtype then
|
elseif reg.wtype then
|
||||||
if reg.wtype.async then
|
if type(reg.wtype) == "table" and reg.wtype.async then
|
||||||
if not reg.lock then
|
if not reg.lock then
|
||||||
reg.lock = true
|
reg.lock = true
|
||||||
return reg.wtype.async(reg.format,
|
return reg.wtype.async(reg.format,
|
||||||
|
|
Loading…
Reference in New Issue