Skip to content

Commit

Permalink
Added subject to email uri
Browse files Browse the repository at this point in the history
  • Loading branch information
sirekanian committed Dec 30, 2023
1 parent 4be4b49 commit 5bd7e1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/main/java/org/sirekanyan/outline/ui/AboutDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ import org.sirekanyan.outline.ui.icons.IconPlayStore

@Composable
fun AboutDialogContent(onDismiss: () -> Unit) {
val appName = stringResource(R.string.outln_app_name)
val appVersion = BuildConfig.VERSION_NAME
AlertDialog(
icon = { Icon(Icons.Default.Info, null) },
title = { Text(stringResource(R.string.outln_app_name) + " " + BuildConfig.VERSION_NAME) },
title = { Text("$appName $appVersion") },
text = {
val context = LocalContext.current
val annotatedString = buildAnnotatedString {
Expand Down Expand Up @@ -67,7 +69,8 @@ fun AboutDialogContent(onDismiss: () -> Unit) {
val clipboard = LocalClipboardManager.current
AboutItem(Icons.Default.Email, "Send feedback") {
val email = "outline@sirekanyan.org"
val intent = Intent(ACTION_SENDTO, Uri.parse("mailto:$email"))
val subject = Uri.encode("Feedback: $appName $appVersion")
val intent = Intent(ACTION_SENDTO, Uri.parse("mailto:$email?subject=$subject"))
try {
context.startActivity(intent)
} catch (exception: Exception) {
Expand Down

0 comments on commit 5bd7e1f

Please sign in to comment.