You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I expect to display loading alert. Once Published variable changes to different value then I'd expect new alert to display only 2 seconds, not infinite. Also tap to dismiss does not work in this case
When your async call update (for example) the sendMessageResponse just set call showComplete() func.
Also,
The loading alert toast disables the tapToDismiss and sets the duration to 0 for his view modifier, so I recommend creating 2 different .toast view modifiers (you can add multiple toast view modifiers on the same view).
One for the loading and another one for Complete & Error.
Describe the bug
I expect to display loading alert. Once Published variable changes to different value then I'd expect new alert to display only 2 seconds, not infinite. Also tap to dismiss does not work in this case
Expected behavior
.toast(isPresenting: $showToast) { if viewModel.sendMessageResponse == .successfullySent { return AlertToast(type: .complete(.green), title: "Message Sent!", custom: .custom(backgroundColor: Color.customYellow)) } else if viewModel.sendMessageResponse == .errornousResponse { return AlertToast(type: .error(.red), title: "Unable to send message!", custom: .custom(backgroundColor: Color.customYellow)) } else { return AlertToast(displayMode: .alert, type: .loading, custom: .custom(backgroundColor: Color.customYellow)) }
Steps
The text was updated successfully, but these errors were encountered: