3
0
mirror of https://github.com/britzl/monarch.git synced 2025-09-27 18:12:22 +02:00

Don't preload an already loaded screen

This commit is contained in:
Björn Ritzl
2018-06-18 07:19:37 +02:00
parent d1cf8281c9
commit e570eac40b

View File

@@ -472,7 +472,7 @@ function M.preload(id, cb)
assert(screens[id], ("There is no screen registered with id %s"):format(tostring(id)))
local screen = screens[id]
if screen.preloaded then
if screen.preloaded or screen.loaded then
if cb then cb() end
return
end