Move parent assignment to renderDefault

This commit is contained in:
Gabriel Tofvesson 2024-10-09 04:29:51 +02:00
parent 32361db152
commit 05c4dbdbcb

View File

@ -212,6 +212,7 @@ local function updatePageRender(state, pages)
end end
local function renderDefault(state, rootElement) local function renderDefault(state, rootElement)
rootElement:setParent(state.monitor)
return function() return function()
local event = {os.pullEvent()} local event = {os.pullEvent()}
local handled = rootElement:handleEvent(event) local handled = rootElement:handleEvent(event)
@ -281,7 +282,6 @@ local PAGES = {
end end
) )
pageState.listState = listState pageState.listState = listState
listResult:setParent(state.monitor)
return renderDefault(state, listResult) return renderDefault(state, listResult)
end, end,