mirror of
https://github.com/britzl/monarch.git
synced 2025-06-27 10:27:49 +02:00
Merge branch 'master' of https://github.com/britzl/monarch
This commit is contained in:
commit
cf75bef8da
@ -436,6 +436,10 @@ 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 cb then cb() end
|
||||||
|
return
|
||||||
|
end
|
||||||
local co
|
local co
|
||||||
co = coroutine.create(function()
|
co = coroutine.create(function()
|
||||||
screen.co = co
|
screen.co = co
|
||||||
|
Loading…
x
Reference in New Issue
Block a user