-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Winback] Link row to Help & Feedback (#2469)
- Loading branch information
Showing
5 changed files
with
83 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
podcasts/Cancel Subscription/CancelSubscriptionOption.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
enum CancelSubscriptionOption: CaseIterable, Hashable, Identifiable { | ||
static var allCases: [CancelSubscriptionOption] = [.promotion(price: ""), .availablePlans, .help] | ||
|
||
case promotion(price: String) | ||
case availablePlans | ||
case help | ||
|
||
var id: Self { | ||
return self | ||
} | ||
|
||
var title: String { | ||
switch self { | ||
case .promotion: | ||
return L10n.cancelSubscriptionPromotionTitle | ||
case .availablePlans: | ||
return L10n.cancelSubscriptionNewPlanTitle | ||
case .help: | ||
return L10n.cancelSubscriptionHelpTitle | ||
} | ||
} | ||
|
||
var subtitle: String { | ||
switch self { | ||
case .promotion(let price): | ||
return L10n.cancelSubscriptionPromotionDescription(price) | ||
case .availablePlans: | ||
return L10n.cancelSubscriptionNewPlanDescription | ||
case .help: | ||
return L10n.cancelSubscriptionHelpDescription | ||
} | ||
} | ||
|
||
var icon: String { | ||
switch self { | ||
case .promotion: | ||
return "cs-heart" | ||
case .availablePlans: | ||
return "cs-skipbackward" | ||
case .help: | ||
return "cs-help" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters