fix: custom alerts configuration for sui + version control changes
This commit is contained in:
parent
000e88f98a
commit
c223a026f2
|
|
@ -40,10 +40,11 @@ public extension View {
|
|||
|
||||
func alert(isPresented: Binding<Bool>,
|
||||
on context: PresentationContext,
|
||||
alertViewFactory: ResultClosure<AlertPresentable>) -> some View {
|
||||
alertDescriptor descriptor: AlertDescriptor,
|
||||
alertViewFactory: Closure<AlertDescriptor, AlertPresentable>) -> some View {
|
||||
|
||||
if isPresented.wrappedValue {
|
||||
alertViewFactory().present(on: context) {
|
||||
alertViewFactory(descriptor).present(on: context) {
|
||||
isPresented.wrappedValue = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import TISwiftUtils
|
|||
import UIKit
|
||||
|
||||
// struct describe alert button information
|
||||
public struct AlertAction: Identifiable {
|
||||
public struct AlertAction {
|
||||
|
||||
public let id = UUID()
|
||||
|
||||
|
|
@ -52,6 +52,11 @@ extension AlertAction: Equatable {
|
|||
}
|
||||
}
|
||||
|
||||
// MARK: - AlertAction + Identifiable
|
||||
|
||||
@available(iOS 13, *)
|
||||
extension AlertAction: Identifiable { }
|
||||
|
||||
// MARK: - AlertAction + Helpers
|
||||
|
||||
extension AlertAction {
|
||||
|
|
|
|||
Loading…
Reference in New Issue