Skip to content

Commit a2e42d7

Browse files
committed
Text feild
1 parent eb26362 commit a2e42d7

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

Screens/ChatPage.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,21 @@ export const ChatPage = ({navigation}) => {
128128

129129
const startRecording = async () => {
130130
setVoiceRecording(true)
131-
const audio=await PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.RECORD_AUDIO)
132-
if(audio===false){
133-
Toast.show("No Audio Permission 😟",{
134-
type: "danger",
135-
placement: "top",
136-
duration: 3000,
137-
offset: 30,
138-
animationType: "zoom-in",
139-
})
140-
setVoiceRecording(false)
141-
}
131+
142132

143133
try {
144134
await Voice.start('en-Us')
135+
const audio=await PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.RECORD_AUDIO)
136+
if(audio===false){
137+
Toast.show("No Audio Permission 😟",{
138+
type: "danger",
139+
placement: "top",
140+
duration: 3000,
141+
offset: 30,
142+
animationType: "zoom-in",
143+
})
144+
setVoiceRecording(false)
145+
}
145146
} catch (error) {
146147
console.log("error raised", error)
147148
}
@@ -214,7 +215,8 @@ export const ChatPage = ({navigation}) => {
214215
borderRadius:100000
215216
}}/>
216217
</TouchableOpacity>
217-
<TextInput autoFocus={true} value={value} onChangeText={(text)=>{
218+
<TextInput multiline={true}
219+
numberOfLines={7} autoFocus={true} value={value} onChangeText={(text)=>{
218220
setvalue(text)
219221
}} style={{
220222
backgroundColor:Style1.color5,

Screens/HistoryChatPage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ export const HistoryChatPage = ({navigation,route}) => {
221221
borderRadius:100000
222222
}}/>
223223
</TouchableOpacity>
224-
<TextInput autoFocus={true} value={value} onChangeText={(text)=>{
224+
<TextInput multiline={true}
225+
numberOfLines={7} autoFocus={true} value={value} onChangeText={(text)=>{
225226
setvalue(text)
226227
}} style={{
227228
backgroundColor:Style1.color5,

0 commit comments

Comments
 (0)