We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dcc317 commit 8b998dcCopy full SHA for 8b998dc
app/src/main/java/to/bitkit/ui/shared/toast/ToastQueueManager.kt
@@ -40,6 +40,7 @@ class ToastQueueManager(private val scope: CoroutineScope) {
40
* Add toast to queue. If queue is full, drops oldest.
41
*/
42
fun enqueue(toast: Toast) {
43
+ dismissCurrentToast()
44
_queue.update { current ->
45
val newQueue = if (current.size >= MAX_QUEUE_SIZE) {
46
// Drop oldest (first item) when queue full
@@ -49,8 +50,6 @@ class ToastQueueManager(private val scope: CoroutineScope) {
49
50
}
51
newQueue
52
-
53
- dismissCurrentToast()
54
55
56
/**
0 commit comments