mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-02 17:07:08 +01:00
adding a crashfix at viewing contact details
This commit is contained in:
parent
8970b1f746
commit
188014ceb8
@ -638,12 +638,14 @@ class ViewContactActivity : ContactActivity() {
|
||||
ensureBackgroundThread {
|
||||
val actions = getSocialActions(contactId)
|
||||
runOnUiThread {
|
||||
ChooseSocialDialog(this@ViewContactActivity, actions) { action ->
|
||||
Intent(Intent.ACTION_VIEW).apply {
|
||||
val uri = ContentUris.withAppendedId(ContactsContract.Data.CONTENT_URI, action.dataId)
|
||||
setDataAndType(uri, action.mimetype)
|
||||
flags = Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
startActivity(this)
|
||||
if (!isDestroyed && !isFinishing) {
|
||||
ChooseSocialDialog(this@ViewContactActivity, actions) { action ->
|
||||
Intent(Intent.ACTION_VIEW).apply {
|
||||
val uri = ContentUris.withAppendedId(ContactsContract.Data.CONTENT_URI, action.dataId)
|
||||
setDataAndType(uri, action.mimetype)
|
||||
flags = Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
startActivity(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user