Skip to content

Commit

Permalink
Update monarch.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Aug 31, 2023
1 parent 169236a commit c473aa0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions monarch/monarch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1330,9 +1330,6 @@ function M.on_focus_changed(id, fn)
screen.focus_fn = fn
end

local function set_on_post(id, fn, url)
end

---
-- Set either a function to be called when msg.post() is called on a specific
-- screen or a URL where the message is sent.
Expand All @@ -1351,7 +1348,7 @@ function M.on_post(id, fn_or_url)
if t == "function" then
screen.receiver_fn = fn_or_url
screen.receiver_url = msg.url()
elseif t == "userdata" then
elseif t == "userdata" or t == "string" then
screen.receiver_fn = nil
screen.receiver_url = fn_or_url
else
Expand Down

0 comments on commit c473aa0

Please sign in to comment.