Dialing number refactor

This commit is contained in:
Agnieszka C 2021-10-18 18:19:26 +02:00
parent 41114e5f2c
commit 44547b05d0
3 changed files with 18 additions and 28 deletions

View file

@ -493,17 +493,7 @@ class ThreadActivity : SimpleActivity() {
private fun dialNumber() {
val phoneNumber = participants.first().phoneNumbers.first()
Intent(Intent.ACTION_DIAL).apply {
data = Uri.fromParts("tel", phoneNumber, null)
try {
startActivity(this)
} catch (e: ActivityNotFoundException) {
toast(R.string.no_app_found)
} catch (e: Exception) {
showErrorToast(e)
}
}
dialNumber(phoneNumber)
}
private fun managePeople() {