From 7cfeda03cb5861ebeb826c1a1ff170e6d6f52640 Mon Sep 17 00:00:00 2001 From: Vova Ignatov Date: Mon, 29 Sep 2025 13:44:44 +0100 Subject: [PATCH] IOS-4807 Remove hideWebPayments feature flag and keep TRUE branch logic --- .../InitialScreen/MembershipModuleView.swift | 26 ------------------- .../MembershipTierSelectionView.swift | 24 +++-------------- .../Generated/FeatureFlags+Flags.swift | 5 ---- .../FeatureDescription+Flags.swift | 5 ---- 4 files changed, 3 insertions(+), 57 deletions(-) diff --git a/Anytype/Sources/PresentationLayer/Modules/Membership/InitialScreen/MembershipModuleView.swift b/Anytype/Sources/PresentationLayer/Modules/Membership/InitialScreen/MembershipModuleView.swift index 25873394b1..850920e27d 100644 --- a/Anytype/Sources/PresentationLayer/Modules/Membership/InitialScreen/MembershipModuleView.swift +++ b/Anytype/Sources/PresentationLayer/Modules/Membership/InitialScreen/MembershipModuleView.swift @@ -6,9 +6,7 @@ import AnytypeCore struct MembershipModuleView: View { - @Environment(\.openURL) private var openURL @State private var safariUrl: URL? - @Injected(\.mailUrlBuilder) private var mailUrlBuilder: any MailUrlBuilderProtocol private let membership: MembershipStatus private let tiers: [MembershipTier] @@ -93,34 +91,10 @@ struct MembershipModuleView: View { } Spacer.fixedHeight(32) - if !FeatureFlags.hideWebPayments { - contactUs - Spacer.fixedHeight(24) - } restorePurchases } } - @MainActor - private var contactUs: some View { - Button { - guard let mailUrl = mailUrlBuilder.membershipUpgrateUrl() else { return } - openURL(mailUrl) - } label: { - Group { - AnytypeText( - "\(Loc.Membership.Legal.wouldYouLike) ", - style: .caption1Regular - ).foregroundColor(.Text.primary) + - AnytypeText( - Loc.Membership.Legal.letUsKnow, - style: .caption1Regular - ).foregroundColor(.Text.primary).underline() - } - .multilineTextAlignment(.leading) - .padding(.horizontal, 20) - } - } private var restorePurchases: some View { AsyncButton { diff --git a/Anytype/Sources/PresentationLayer/Modules/Membership/TierSelection/MembershipTierSelectionView.swift b/Anytype/Sources/PresentationLayer/Modules/Membership/TierSelection/MembershipTierSelectionView.swift index 08675ed6f9..84b3e02c28 100644 --- a/Anytype/Sources/PresentationLayer/Modules/Membership/TierSelection/MembershipTierSelectionView.swift +++ b/Anytype/Sources/PresentationLayer/Modules/Membership/TierSelection/MembershipTierSelectionView.swift @@ -6,7 +6,6 @@ import StoreKit struct MembershipTierSelectionView: View { @StateObject private var model: MembershipTierSelectionViewModel - @State private var safariUrl: URL? init( @@ -26,7 +25,6 @@ struct MembershipTierSelectionView: View { var body: some View { content - .safariSheet(url: $safariUrl) .task { await model.onAppear() } @@ -73,29 +71,13 @@ struct MembershipTierSelectionView: View { case .appStore(let product): MembershipNameSheetView(tier: model.tierToDisplay, anyName: model.userMembership.anyName, product: product, onSuccessfulPurchase: model.onSuccessfulPurchase) case .external(let url): - if FeatureFlags.hideWebPayments { - notAvaliableOnAppStore - } else { - moreInfoButton(url: url) - } + notAvaliableOnAppStore } } } } - func moreInfoButton(url: URL) -> some View { - VStack { - StandardButton(Loc.moreInfo, style: .primaryLarge) { - AnytypeAnalytics.instance().logClickMembership(type: .moreInfo) - safariUrl = url - } - .padding(.horizontal, 20) - .padding(.vertical, 34) - } - .background(Color.Background.primary) - .cornerRadius(16, corners: .top) - } - + var notAvaliableOnAppStore: some View { VStack { AnytypeText(Loc.Membership.unavailable, style: .uxTitle2Regular) @@ -107,7 +89,7 @@ struct MembershipTierSelectionView: View { .background(Color.Background.primary) .cornerRadius(16, corners: .top) } - + // To mimic sheet overlay style var sheetBackground: some View { LinearGradient( diff --git a/Modules/AnytypeCore/AnytypeCore/Generated/FeatureFlags+Flags.swift b/Modules/AnytypeCore/AnytypeCore/Generated/FeatureFlags+Flags.swift index a65edb33dc..b4a08a169e 100644 --- a/Modules/AnytypeCore/AnytypeCore/Generated/FeatureFlags+Flags.swift +++ b/Modules/AnytypeCore/AnytypeCore/Generated/FeatureFlags+Flags.swift @@ -82,10 +82,6 @@ public extension FeatureFlags { value(for: .dndOnCollectionsAndSets) } - static var hideWebPayments: Bool { - value(for: .hideWebPayments) - } - static var enableStreamSpaceType: Bool { value(for: .enableStreamSpaceType) } @@ -207,7 +203,6 @@ public extension FeatureFlags { .setKanbanView, .fullInlineSetImpl, .dndOnCollectionsAndSets, - .hideWebPayments, .enableStreamSpaceType, .aiToolInSet, .anyAppBetaTip, diff --git a/Modules/AnytypeCore/AnytypeCore/Utils/FeatureFlags/FeatureDescription+Flags.swift b/Modules/AnytypeCore/AnytypeCore/Utils/FeatureFlags/FeatureDescription+Flags.swift index 8efafae358..e0652b0da4 100644 --- a/Modules/AnytypeCore/AnytypeCore/Utils/FeatureFlags/FeatureDescription+Flags.swift +++ b/Modules/AnytypeCore/AnytypeCore/Utils/FeatureFlags/FeatureDescription+Flags.swift @@ -122,11 +122,6 @@ public extension FeatureDescription { defaultValue: false ) - static let hideWebPayments = FeatureDescription( - title: "Hide web based payments for memebership tier", - type: .feature(author: "vova@anytype.io", releaseVersion: "On demand"), - defaultValue: true - ) static let enableStreamSpaceType = FeatureDescription( title: "Create stream space",