Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

[FIX] Show only email apps for sending email #2039

Merged
merged 8 commits into from
Mar 8, 2019

Conversation

divyanshub024
Copy link
Contributor

@divyanshub024 divyanshub024 commented Feb 26, 2019

@RocketChat/android

Closes #2038

Description:

Shows only email apps for sending "contact us" mail.

@divyanshub024 divyanshub024 changed the title Show only email apps for sending email [IMPROVEMENT] Show only email apps for sending email Feb 26, 2019
val uriText = "mailto:${"support@rocket.chat"}" +
"?subject=" + Uri.encode(getString(R.string.msg_android_app_support)) +
"&body=" + Uri.encode(getDeviceAndAppInformation())
val uri = Uri.parse(uriText)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove this variable here (val uri = Uri.parse(uriText))...

val uri = Uri.parse(uriText)

with(Intent(Intent.ACTION_SENDTO)) {
data = uri
Copy link
Contributor

Choose a reason for hiding this comment

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

... And define data like:

data = uriText.toUri()

@divyanshub024
Copy link
Contributor Author

@filipedelimabrito I have made the requested changes.

Copy link
Contributor

@philipbrito philipbrito left a comment

Choose a reason for hiding this comment

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

Thanks for sending this PR @divyanshub024 💯

@philipbrito philipbrito added this to the 3.3.0 milestone Mar 8, 2019
@philipbrito philipbrito changed the title [IMPROVEMENT] Show only email apps for sending email [FIX] Show only email apps for sending email Mar 8, 2019
@philipbrito philipbrito merged commit c69d136 into RocketChat:develop Mar 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Setting -> "Contact us" should show only email apps
2 participants