3
0
mirror of https://github.com/britzl/monarch.git synced 2025-11-26 19:00:53 +01:00

Compare commits

..

1 Commits
2.6.0 ... 2.6.1

Author SHA1 Message Date
Alexey Gulev
6fbec4ab8f preventing double preload of the screen (#20)
* preventing double preload of the screen
2018-06-04 07:48:46 +02:00

View File

@@ -436,6 +436,10 @@ 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 cb then cb() end
return
end
local co
co = coroutine.create(function()
screen.co = co