diff --git a/Mlem/Views/Shared/Posts/Expanded Post.swift b/Mlem/Views/Shared/Posts/Expanded Post.swift index 59ac7b6e1..a29c5c90b 100644 --- a/Mlem/Views/Shared/Posts/Expanded Post.swift +++ b/Mlem/Views/Shared/Posts/Expanded Post.swift @@ -24,7 +24,6 @@ private struct AnchorsKey: PreferenceKey { } } -// swiftlint:disable type_body_length struct ExpandedPost: View { @Dependency(\.apiClient) var apiClient @Dependency(\.commentRepository) var commentRepository @@ -327,5 +326,3 @@ struct ExpandedPost: View { } } } - -// swiftlint:enable type_body_length diff --git a/Mlem/Views/Tabs/Feeds/Feed View.swift b/Mlem/Views/Tabs/Feeds/Feed View.swift index ca0536066..6a5a653da 100644 --- a/Mlem/Views/Tabs/Feeds/Feed View.swift +++ b/Mlem/Views/Tabs/Feeds/Feed View.swift @@ -96,6 +96,16 @@ struct FeedView: View { @Environment(\.horizontalSizeClass) private var horizontalSizeClass + // MARK: Destructive confirmation + + @State private var isPresentingConfirmDestructive: Bool = false + @State private var confirmationMenuFunction: StandardMenuFunction? + + func confirmDestructive(destructiveFunction: StandardMenuFunction) { + confirmationMenuFunction = destructiveFunction + isPresentingConfirmDestructive = true + } + // MARK: - Main Views var body: some View {