mirror of
https://github.com/britzl/monarch.git
synced 2025-11-27 19:30:54 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ba3064749 | ||
|
|
b78b896ada |
@@ -222,6 +222,13 @@ IMPORTANT! If you provide a function you must also make sure to call `monarch.on
|
|||||||
* `fn_or_url` (function) - The function to call or URL to send message to
|
* `fn_or_url` (function) - The function to call or URL to send message to
|
||||||
|
|
||||||
|
|
||||||
|
## monarch.has_missing_resources(screen_id)
|
||||||
|
Check if a screen has any missing resources. If the screen is loaded by a collection proxy with Load Dynamically this will use `collectionproxy.missing_resources()`. For other cases this function will always return false.
|
||||||
|
|
||||||
|
**RETURN**
|
||||||
|
* `result` (boolean) - true if the screen has missing resources
|
||||||
|
|
||||||
|
|
||||||
## monarch.debug()
|
## monarch.debug()
|
||||||
Enable verbose logging of the internals of Monarch.
|
Enable verbose logging of the internals of Monarch.
|
||||||
|
|
||||||
|
|||||||
@@ -430,8 +430,10 @@ local function unload(screen, force)
|
|||||||
elseif screen.factory then
|
elseif screen.factory then
|
||||||
log("unload() factory", screen.id)
|
log("unload() factory", screen.id)
|
||||||
for id, instance in pairs(screen.factory_ids) do
|
for id, instance in pairs(screen.factory_ids) do
|
||||||
|
if go.exists(instance) then
|
||||||
go.delete(instance)
|
go.delete(instance)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
screen.factory_ids = nil
|
screen.factory_ids = nil
|
||||||
if screen.auto_preload and not force then
|
if screen.auto_preload and not force then
|
||||||
screen.loaded = false
|
screen.loaded = false
|
||||||
@@ -1374,8 +1376,10 @@ function M.on_post(id, fn_or_url)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local empty_hash = hash("")
|
||||||
|
|
||||||
local function url_to_key(url)
|
local function url_to_key(url)
|
||||||
return (url.socket or hash("")) .. (url.path or hash("")) .. (url.fragment or hash(""))
|
return (url.socket or empty_hash) .. (url.path or empty_hash) .. (url.fragment or empty_hash)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user