adding a crashfix at viewing contact details

This commit is contained in:
tibbi 2021-05-18 15:45:04 +02:00
parent 8970b1f746
commit 188014ceb8

View file

@ -638,12 +638,14 @@ class ViewContactActivity : ContactActivity() {
ensureBackgroundThread { ensureBackgroundThread {
val actions = getSocialActions(contactId) val actions = getSocialActions(contactId)
runOnUiThread { runOnUiThread {
ChooseSocialDialog(this@ViewContactActivity, actions) { action -> if (!isDestroyed && !isFinishing) {
Intent(Intent.ACTION_VIEW).apply { ChooseSocialDialog(this@ViewContactActivity, actions) { action ->
val uri = ContentUris.withAppendedId(ContactsContract.Data.CONTENT_URI, action.dataId) Intent(Intent.ACTION_VIEW).apply {
setDataAndType(uri, action.mimetype) val uri = ContentUris.withAppendedId(ContactsContract.Data.CONTENT_URI, action.dataId)
flags = Intent.FLAG_ACTIVITY_CLEAR_TASK setDataAndType(uri, action.mimetype)
startActivity(this) flags = Intent.FLAG_ACTIVITY_CLEAR_TASK
startActivity(this)
}
} }
} }
} }