@@ -6,8 +6,8 @@ import {Card} from '../components/card'
66import * as c from '../components/colors'
77import type { StudentOrgType } from './types'
88import type { TopLevelViewPropsType } from '../types'
9- import { email } from 'react-native-communications '
10- import openUrl from '../components/open-url'
9+ import { sendEmail } from '../components/send-email '
10+ import { openUrl } from '../components/open-url'
1111import { cleanOrg , showNameOrEmail } from './util'
1212
1313const styles = StyleSheet . create ( {
@@ -66,12 +66,6 @@ export class StudentOrgsDetailView extends React.PureComponent<Props> {
6666 }
6767 }
6868
69- // Using the Communications library because `mailTo` complains about
70- // the lack of an available Activity...
71- openEmail = ( to : string , org : string ) => {
72- email ( [ to ] , null , null , org , '' )
73- }
74-
7569 render ( ) {
7670 const {
7771 name : orgName ,
@@ -113,7 +107,7 @@ export class StudentOrgsDetailView extends React.PureComponent<Props> {
113107 { contacts . map ( ( c , i ) => (
114108 < Text
115109 key = { i }
116- onPress = { ( ) => this . openEmail ( c . email , orgName ) }
110+ onPress = { ( ) => sendEmail ( { to : [ c . email ] , subject : orgName } ) }
117111 selectable = { true }
118112 style = { styles . cardBody }
119113 >
@@ -132,7 +126,7 @@ export class StudentOrgsDetailView extends React.PureComponent<Props> {
132126 { advisors . map ( ( c , i ) => (
133127 < Text
134128 key = { i }
135- onPress = { ( ) => this . openEmail ( c . email , orgName ) }
129+ onPress = { ( ) => sendEmail ( { to : [ c . email ] , subject : orgName } ) }
136130 selectable = { true }
137131 style = { styles . cardBody }
138132 >
0 commit comments