Skip to content

Commit 7cfeda0

Browse files
committed
IOS-4807 Remove hideWebPayments feature flag and keep TRUE branch logic
1 parent 5b3dc5d commit 7cfeda0

File tree

4 files changed

+3
-57
lines changed

4 files changed

+3
-57
lines changed

Anytype/Sources/PresentationLayer/Modules/Membership/InitialScreen/MembershipModuleView.swift

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import AnytypeCore
66

77

88
struct MembershipModuleView: View {
9-
@Environment(\.openURL) private var openURL
109
@State private var safariUrl: URL?
11-
@Injected(\.mailUrlBuilder) private var mailUrlBuilder: any MailUrlBuilderProtocol
1210

1311
private let membership: MembershipStatus
1412
private let tiers: [MembershipTier]
@@ -93,34 +91,10 @@ struct MembershipModuleView: View {
9391
}
9492

9593
Spacer.fixedHeight(32)
96-
if !FeatureFlags.hideWebPayments {
97-
contactUs
98-
Spacer.fixedHeight(24)
99-
}
10094
restorePurchases
10195
}
10296
}
10397

104-
@MainActor
105-
private var contactUs: some View {
106-
Button {
107-
guard let mailUrl = mailUrlBuilder.membershipUpgrateUrl() else { return }
108-
openURL(mailUrl)
109-
} label: {
110-
Group {
111-
AnytypeText(
112-
"\(Loc.Membership.Legal.wouldYouLike) ",
113-
style: .caption1Regular
114-
).foregroundColor(.Text.primary) +
115-
AnytypeText(
116-
Loc.Membership.Legal.letUsKnow,
117-
style: .caption1Regular
118-
).foregroundColor(.Text.primary).underline()
119-
}
120-
.multilineTextAlignment(.leading)
121-
.padding(.horizontal, 20)
122-
}
123-
}
12498

12599
private var restorePurchases: some View {
126100
AsyncButton {

Anytype/Sources/PresentationLayer/Modules/Membership/TierSelection/MembershipTierSelectionView.swift

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import StoreKit
66

77
struct MembershipTierSelectionView: View {
88
@StateObject private var model: MembershipTierSelectionViewModel
9-
@State private var safariUrl: URL?
109

1110

1211
init(
@@ -26,7 +25,6 @@ struct MembershipTierSelectionView: View {
2625

2726
var body: some View {
2827
content
29-
.safariSheet(url: $safariUrl)
3028
.task {
3129
await model.onAppear()
3230
}
@@ -73,29 +71,13 @@ struct MembershipTierSelectionView: View {
7371
case .appStore(let product):
7472
MembershipNameSheetView(tier: model.tierToDisplay, anyName: model.userMembership.anyName, product: product, onSuccessfulPurchase: model.onSuccessfulPurchase)
7573
case .external(let url):
76-
if FeatureFlags.hideWebPayments {
77-
notAvaliableOnAppStore
78-
} else {
79-
moreInfoButton(url: url)
80-
}
74+
notAvaliableOnAppStore
8175
}
8276
}
8377
}
8478
}
8579

86-
func moreInfoButton(url: URL) -> some View {
87-
VStack {
88-
StandardButton(Loc.moreInfo, style: .primaryLarge) {
89-
AnytypeAnalytics.instance().logClickMembership(type: .moreInfo)
90-
safariUrl = url
91-
}
92-
.padding(.horizontal, 20)
93-
.padding(.vertical, 34)
94-
}
95-
.background(Color.Background.primary)
96-
.cornerRadius(16, corners: .top)
97-
}
98-
80+
9981
var notAvaliableOnAppStore: some View {
10082
VStack {
10183
AnytypeText(Loc.Membership.unavailable, style: .uxTitle2Regular)
@@ -107,7 +89,7 @@ struct MembershipTierSelectionView: View {
10789
.background(Color.Background.primary)
10890
.cornerRadius(16, corners: .top)
10991
}
110-
92+
11193
// To mimic sheet overlay style
11294
var sheetBackground: some View {
11395
LinearGradient(

Modules/AnytypeCore/AnytypeCore/Generated/FeatureFlags+Flags.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ public extension FeatureFlags {
8282
value(for: .dndOnCollectionsAndSets)
8383
}
8484

85-
static var hideWebPayments: Bool {
86-
value(for: .hideWebPayments)
87-
}
88-
8985
static var enableStreamSpaceType: Bool {
9086
value(for: .enableStreamSpaceType)
9187
}
@@ -207,7 +203,6 @@ public extension FeatureFlags {
207203
.setKanbanView,
208204
.fullInlineSetImpl,
209205
.dndOnCollectionsAndSets,
210-
.hideWebPayments,
211206
.enableStreamSpaceType,
212207
.aiToolInSet,
213208
.anyAppBetaTip,

Modules/AnytypeCore/AnytypeCore/Utils/FeatureFlags/FeatureDescription+Flags.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,6 @@ public extension FeatureDescription {
122122
defaultValue: false
123123
)
124124

125-
static let hideWebPayments = FeatureDescription(
126-
title: "Hide web based payments for memebership tier",
127-
type: .feature(author: "[email protected]", releaseVersion: "On demand"),
128-
defaultValue: true
129-
)
130125

131126
static let enableStreamSpaceType = FeatureDescription(
132127
title: "Create stream space",

0 commit comments

Comments
 (0)