From 4569a039fe5b76bbd4c7301a7904f3070d2cf862 Mon Sep 17 00:00:00 2001 From: Cesar de la Vega Date: Fri, 5 Jul 2024 20:04:16 +0200 Subject: [PATCH] Add contact support button --- .../Views/ManageSubscriptionsView.swift | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsView.swift b/RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsView.swift index ad589e7206..8036ead0d3 100644 --- a/RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsView.swift +++ b/RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsView.swift @@ -25,9 +25,6 @@ import SwiftUI @available(visionOS, unavailable) struct ManageSubscriptionsView: View { - @Environment(\.openURL) - var openURL - @StateObject private var viewModel: ManageSubscriptionsViewModel @@ -166,6 +163,8 @@ struct ManageSubscriptionsButtonsView: View { var viewModel: ManageSubscriptionsViewModel @Binding var loadingPath: CustomerCenterConfigData.HelpPath? + @Environment(\.openURL) + var openURL var body: some View { VStack(spacing: 16) { @@ -179,6 +178,12 @@ struct ManageSubscriptionsButtonsView: View { ForEach(filteredPaths, id: \.id) { path in ManageSubscriptionButton(path: path, viewModel: self.viewModel) } + Button("Contact support") { + Task { + openURL(URLUtilities.createMailURL()!) + } + } + .padding() } }