Skip to content

Commit 0081f30

Browse files
feat: PromptQueue - Expose showing state (#525)
1 parent 0a20ace commit 0081f30

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/promptqueue/src/Shared/PromptQueue.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,24 @@ function PromptQueue:HideCurrent(doNotAnimate)
166166
end
167167
end
168168

169+
--[=[
170+
Returns whether or not the PromptQueue is currently showing its contents.
171+
172+
@return boolean
173+
]=]
174+
function PromptQueue:IsShowing()
175+
return self._isShowing.Value
176+
end
177+
178+
--[=[
179+
Observes the current state of the PromptQueue, emitting true when showing and false if not.
180+
181+
@return Observable<boolean>
182+
]=]
183+
function PromptQueue:ObserveIsShowing()
184+
return self._isShowing:Observe()
185+
end
186+
169187
function PromptQueue:_startQueueProcessing()
170188
if self._maid._processing then
171189
return

0 commit comments

Comments
 (0)