fix: custom alerts configuration for sui + version control changes

This commit is contained in:
Nikita Semenov 2022-07-25 14:08:01 +03:00
parent 000e88f98a
commit c223a026f2
2 changed files with 9 additions and 3 deletions

View File

@ -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
}
}

View File

@ -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 {