File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -638,12 +638,14 @@ class ViewContactActivity : ContactActivity() {
638638 ensureBackgroundThread {
639639 val actions = getSocialActions(contactId)
640640 runOnUiThread {
641- ChooseSocialDialog (this @ViewContactActivity, actions) { action ->
642- Intent (Intent .ACTION_VIEW ).apply {
643- val uri = ContentUris .withAppendedId(ContactsContract .Data .CONTENT_URI , action.dataId)
644- setDataAndType(uri, action.mimetype)
645- flags = Intent .FLAG_ACTIVITY_CLEAR_TASK
646- startActivity(this )
641+ if (! isDestroyed && ! isFinishing) {
642+ ChooseSocialDialog (this @ViewContactActivity, actions) { action ->
643+ Intent (Intent .ACTION_VIEW ).apply {
644+ val uri = ContentUris .withAppendedId(ContactsContract .Data .CONTENT_URI , action.dataId)
645+ setDataAndType(uri, action.mimetype)
646+ flags = Intent .FLAG_ACTIVITY_CLEAR_TASK
647+ startActivity(this )
648+ }
647649 }
648650 }
649651 }
You can’t perform that action at this time.
0 commit comments