mirror of
https://github.com/britzl/monarch.git
synced 2025-11-27 11:20:55 +01:00
Don't preload an already loaded screen
This commit is contained in:
@@ -472,7 +472,7 @@ function M.preload(id, cb)
|
|||||||
assert(screens[id], ("There is no screen registered with id %s"):format(tostring(id)))
|
assert(screens[id], ("There is no screen registered with id %s"):format(tostring(id)))
|
||||||
|
|
||||||
local screen = screens[id]
|
local screen = screens[id]
|
||||||
if screen.preloaded then
|
if screen.preloaded or screen.loaded then
|
||||||
if cb then cb() end
|
if cb then cb() end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user