Skip to content

Commit 8a1cb75

Browse files
committed
port ContactDetailView to new communication methods
1 parent f6d0524 commit 8a1cb75

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/views/contacts/contact-detail.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import {contactImages} from '../../../images/contact-images'
55
import {Markdown} from '../components/markdown'
66
import {ListFooter} from '../components/list'
77
import glamorous from 'glamorous-native'
8-
import {phonecall} from 'react-native-communications'
8+
import {callPhone} from '../components/call-phone'
99
import {tracker} from '../../analytics'
1010
import {Button} from '../components/button'
11-
import openUrl from '../components/open-url'
11+
import {openUrl} from '../components/open-url'
1212
import type {ContactType} from './types'
1313
import {GH_NEW_ISSUE_URL} from '../../globals'
1414

@@ -41,8 +41,8 @@ function formatNumber(phoneNumber: string) {
4141

4242
function promptCall(buttonText: string, phoneNumber: string) {
4343
Alert.alert(buttonText, formatNumber(phoneNumber), [
44-
{text: 'Cancel', onPress: () => console.log('Call cancel pressed')},
45-
{text: 'Call', onPress: () => phonecall(phoneNumber, false)},
44+
{text: 'Cancel', onPress: () => {}},
45+
{text: 'Call', onPress: () => callPhone(phoneNumber, {prompt: false})},
4646
])
4747
}
4848

0 commit comments

Comments
 (0)