fix: badge counters broken by previous commit

This commit is contained in:
tomasklaen
2022-09-19 17:33:22 +02:00
parent fca0dff196
commit d63d5a7434

View File

@@ -3239,6 +3239,7 @@ function Controls:clean_controls()
if control.element then Elements:remove(control.element) end
end
for _, disposer in ipairs(self.disposers) do disposer() end
self.disposers = {}
self.controls = {}
request_render()
end
@@ -3254,6 +3255,7 @@ function Controls:register_badge_updater(prop, element)
for _, track in ipairs(value) do if track.type == prop then count = count + 1 end end
return count
end
else
serializer = function(value) return value and (type(value) == 'table' and #value or tostring(value)) or nil end
end
local function handler(_, value)