Unverified Commit a81619e1 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Update SettingsFragment.kt

parent e92e886b
...@@ -29,7 +29,6 @@ import dagger.android.support.AndroidSupportInjection ...@@ -29,7 +29,6 @@ import dagger.android.support.AndroidSupportInjection
import kotlinx.android.synthetic.main.fragment_settings.* import kotlinx.android.synthetic.main.fragment_settings.*
import timber.log.Timber import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject
import android.net.Uri
internal const val TAG_SETTINGS_FRAGMENT = "SettingsFragment" internal const val TAG_SETTINGS_FRAGMENT = "SettingsFragment"
...@@ -132,10 +131,9 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen ...@@ -132,10 +131,9 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
val uriText = "mailto:${"support@rocket.chat"}" + val uriText = "mailto:${"support@rocket.chat"}" +
"?subject=" + Uri.encode(getString(R.string.msg_android_app_support)) + "?subject=" + Uri.encode(getString(R.string.msg_android_app_support)) +
"&body=" + Uri.encode(getDeviceAndAppInformation()) "&body=" + Uri.encode(getDeviceAndAppInformation())
val uri = Uri.parse(uriText)
with(Intent(Intent.ACTION_SENDTO)) { with(Intent(Intent.ACTION_SENDTO)) {
data = uri data = uriText.toUri()
try { try {
startActivity(Intent.createChooser(this, getString(R.string.msg_send_email))) startActivity(Intent.createChooser(this, getString(R.string.msg_send_email)))
} catch (ex: ActivityNotFoundException) { } catch (ex: ActivityNotFoundException) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment