Skip to content

Commit

Permalink
Fixed feedback email
Browse files Browse the repository at this point in the history
  • Loading branch information
PavloNetrebchuk committed Oct 30, 2023
1 parent dbdea15 commit 4a52c55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class FeedbackDialogFragment : BaseAppReviewDialogFragment() {
private fun sendEmail(feedback: String) {
EmailUtil.showFeedbackScreen(
context = requireContext(),
subject = feedback,
feedback = feedback,
appVersion = (requireActivity() as AppDataHolder).appData.versionName
)
}
Expand Down
5 changes: 3 additions & 2 deletions core/src/main/java/org/openedx/core/utils/EmailUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ object EmailUtil {

fun showFeedbackScreen(
context: Context,
subject: String,
subject: String = context.getString(R.string.core_email_subject),
feedback: String = "",
appVersion: String
) {
val NEW_LINE = "\n"
Expand All @@ -25,7 +26,7 @@ object EmailUtil {
append("${context.getString(R.string.core_android_device_model)} ${Build.MODEL}")
append(NEW_LINE)
append(NEW_LINE)
append(context.getString(R.string.core_insert_feedback))
append("${context.getString(R.string.core_insert_feedback)} $feedback")
}
sendEmailIntent(context, to, subject, body.toString())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,8 @@ private fun SupportInfoSection(
onClick = {
onClick(SupportClickAction.SUPPORT)
EmailUtil.showFeedbackScreen(
context,
context.getString(R.string.core_email_subject),
appData.versionName
context = context,
appVersion = appData.versionName
)
}
)
Expand Down

0 comments on commit 4a52c55

Please sign in to comment.