mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 20:21:38 +00:00
Return dismiss function from Notify
This commit is contained in:
parent
5c0e1d0ec4
commit
91cba1b0e9
1 changed files with 3 additions and 4 deletions
|
|
@ -302,13 +302,13 @@ function API.new(app)
|
|||
end
|
||||
|
||||
Rojo._apiDescriptions.Notify = "Shows a notification in the Rojo UI"
|
||||
function Rojo:Notify(msg: string, timeout: number?, actions: { [string]: {text: string, style: string, layoutOrder: number, onClick: (any) -> ()} }?)
|
||||
function Rojo:Notify(msg: string, timeout: number?, actions: { [string]: {text: string, style: string, layoutOrder: number, onClick: (any) -> ()} }?): () -> ()
|
||||
assert(type(msg) == "string", "Message must be type `string`")
|
||||
assert(type(timeout) == "number" or timeout == nil, "Timeout must be type `number?`")
|
||||
assert((actions == nil) or (type(actions) == "table"), "Actions must be table or nil")
|
||||
|
||||
if Rojo:_checkRateLimit("Notify") then
|
||||
return
|
||||
return function() end
|
||||
end
|
||||
|
||||
local sanitizedActions = nil
|
||||
|
|
@ -333,8 +333,7 @@ function API.new(app)
|
|||
end
|
||||
end
|
||||
|
||||
app:addThirdPartyNotification(Rojo:_getCallerName(), msg, timeout, sanitizedActions)
|
||||
return
|
||||
return app:addThirdPartyNotification(Rojo:_getCallerName(), msg, timeout, sanitizedActions)
|
||||
end
|
||||
|
||||
Rojo._apiDescriptions.GetHostAndPort = "Gets the host and port that Rojo is set to"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue