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
local function renderDefault(state, rootElement)
rootElement:setParent(state.monitor)
return function()
local event = {os.pullEvent()}
local handled = rootElement:handleEvent(event)
@ -281,7 +282,6 @@ local PAGES = {
end
)
pageState.listState = listState
listResult:setParent(state.monitor)
return renderDefault(state, listResult)
end,