Reformat code
This commit is contained in:
@@ -3,7 +3,6 @@ import Library
|
||||
import SwiftUI
|
||||
|
||||
public extension View {
|
||||
@ViewBuilder
|
||||
func alert(_ binding: Binding<AlertState?>, isLoading: Binding<Bool>) -> some View {
|
||||
alert(
|
||||
binding.wrappedValue?.title ?? "",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
public struct DeleteButton<Label>: View where Label: View {
|
||||
public struct DeleteButton<Label: View>: View {
|
||||
private let action: () async -> Void
|
||||
private let label: Label
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import SwiftUI
|
||||
#endif
|
||||
|
||||
@MainActor
|
||||
public struct ProfileShareButton<Label>: View where Label: View {
|
||||
public struct ProfileShareButton<Label: View>: View {
|
||||
private let alert: Binding<AlertState?>
|
||||
private let profile: Profile
|
||||
private let label: () -> Label
|
||||
@@ -40,7 +40,7 @@ public struct ProfileShareButton<Label>: View where Label: View {
|
||||
}
|
||||
}
|
||||
|
||||
public struct ShareButtonCompat<Label>: View where Label: View {
|
||||
public struct ShareButtonCompat<Label: View>: View {
|
||||
private let label: () -> Label
|
||||
private let itemURL: () async throws -> URL
|
||||
|
||||
@@ -137,8 +137,7 @@ public struct ShareButtonCompat<Label>: View where Label: View {
|
||||
}
|
||||
|
||||
func makeNSView(context _: Context) -> NSView {
|
||||
let view = NSView()
|
||||
return view
|
||||
NSView()
|
||||
}
|
||||
|
||||
func updateNSView(_ nsView: NSView, context: Context) {
|
||||
|
||||
@@ -7,7 +7,7 @@ public extension View {
|
||||
}
|
||||
}
|
||||
|
||||
func onChangeCompat<V>(of value: V, _ action: @escaping (_ newValue: V) -> Void) -> some View where V: Equatable {
|
||||
func onChangeCompat<V: Equatable>(of value: V, _ action: @escaping (_ newValue: V) -> Void) -> some View {
|
||||
onChange(of: value, perform: action)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,6 @@ public extension View {
|
||||
#endif
|
||||
|
||||
public extension View {
|
||||
@ViewBuilder
|
||||
func cardStyle() -> some View {
|
||||
modifier(CardStyleModifier())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user