Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add defaultLanguageText to feedbackSurveyCompleted callback #4625

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion RevenueCatUI/CustomerCenter/Data/CustomerCenterAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ public enum CustomerCenterAction {
/// - Parameter refundRequestStatus: The status of the refund request
case refundRequestCompleted(_ refundRequestStatus: RefundRequestStatus)
/// An option of the feedback survey has been selected
/// - Parameter feedbackSurveyOptionId: The id of the feedback survey option selected
/// - Parameter feedbackSurveyOptionId: The id of the selected feedback survey option
case feedbackSurveyCompleted(_ feedbackSurveyOptionId: String)
/// An option of the feedback survey has been selected
/// - Parameter feedbackSurveyOptionId: The id of the selected feedback survey option
/// - Parameter defaultLanguageText: The displayed text of the selected feedback survey option (in English)
case feedbackSurveyCompleted(_ feedbackSurveyOptionId: String, defaultLanguageText: String)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure about the name of hte parameter


}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class FeedbackSurveyViewModel: ObservableObject {
if let customerCenterActionHandler = self.customerCenterActionHandler {
trackSurveyAnswerSubmitted(option: option, darkMode: darkMode, displayMode: displayMode)
customerCenterActionHandler(.feedbackSurveyCompleted(option.id))
// TODO: update to send English text, not title
customerCenterActionHandler(.feedbackSurveyCompleted(option.id, option.title))
}

if let promotionalOffer = option.promotionalOffer,
Expand Down