From 742779d7497ad0a795570716d89f68754281190a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Thu, 26 Oct 2023 13:54:14 +0200 Subject: [PATCH] Allow monarch.post() to loaded screens Fixes #98 --- monarch/monarch.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monarch/monarch.lua b/monarch/monarch.lua index 8b869ad..2862861 100644 --- a/monarch/monarch.lua +++ b/monarch/monarch.lua @@ -1189,8 +1189,8 @@ end -- @return error (string|nil) Error message if unable to send message function M.post(id, message_id, message) assert(id, "You must provide a screen id") - if not M.is_visible(id) then - return false, "Unable to post message to screen if it isn't visible" + if not M.is_loaded(id) then + return false, "Unable to post message to screen if it isn't loaded" end assert(message_id, "You must provide a message_id")