[Customer Center] SubscriptionDetailsView gets its strings from CommonLocalizedString.#4083
Merged
JayShortway merged 15 commits intoJul 22, 2024
Conversation
tonidero
reviewed
Jul 19, 2024
124e143 to
4645dd1
Compare
96df80f to
60ae1dc
Compare
tonidero
approved these changes
Jul 19, 2024
Comment on lines
+158
to
+164
| var explanation: String { | ||
| return subscriptionInformation.active ? ( | ||
| subscriptionInformation.willRenew ? | ||
| localization.commonLocalizedString(for: .subEarliestRenewal) : | ||
| localization.commonLocalizedString(for: .subEarliestExpiration) | ||
| ) : localization.commonLocalizedString(for: .subExpired) | ||
| } |
Contributor
There was a problem hiding this comment.
NABD but any reason to keep this as a computed property? Or could we simplify it like this
Suggested change
| var explanation: String { | |
| return subscriptionInformation.active ? ( | |
| subscriptionInformation.willRenew ? | |
| localization.commonLocalizedString(for: .subEarliestRenewal) : | |
| localization.commonLocalizedString(for: .subEarliestExpiration) | |
| ) : localization.commonLocalizedString(for: .subExpired) | |
| } | |
| var explanation = subscriptionInformation.active ? ( | |
| subscriptionInformation.willRenew ? | |
| localization.commonLocalizedString(for: .subEarliestRenewal) : | |
| localization.commonLocalizedString(for: .subEarliestExpiration) | |
| ) : localization.commonLocalizedString(for: .subExpired) |
Member
Author
There was a problem hiding this comment.
No reason! I even asked ChatGPT if this was idiomatic SwiftUI haha. Thanks for the suggestion! Please keep em coming.
I'll do this here and for expirationString below.
Base automatically changed from
06-17-removes_eligibility_from_reponse
to
integration/customer_support_workflow
July 19, 2024 14:30
60ae1dc to
bedd434
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As the title says.
SubscriptionDetailsViewgets its strings fromCommonLocalizedString.SubscriptionInformation.SubscriptionInformationhaving to care about localization, and having to add@availableannotations, since it's only available on iOS 15 and up.