ordering-ui-react-native 0.18.79 → 0.18.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -312,14 +312,15 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
312
312
|
quality: 1
|
|
313
313
|
},
|
|
314
314
|
(response: any) => {
|
|
315
|
-
|
|
315
|
+
const image = response.assets[0];
|
|
316
|
+
if (image.didCancel) {
|
|
316
317
|
console.log('User cancelled image picker');
|
|
317
|
-
} else if (
|
|
318
|
-
console.log('ImagePicker Error: ',
|
|
319
|
-
showToast(ToastType.Error,
|
|
318
|
+
} else if (image.errorMessage) {
|
|
319
|
+
console.log('ImagePicker Error: ', image.errorMessage);
|
|
320
|
+
showToast(ToastType.Error, image.errorMessage);
|
|
320
321
|
} else {
|
|
321
|
-
if (
|
|
322
|
-
const url = `data:${
|
|
322
|
+
if (image.uri) {
|
|
323
|
+
const url = `data:${image.type};base64,${image.base64}`;
|
|
323
324
|
setImage && setImage(url);
|
|
324
325
|
} else {
|
|
325
326
|
showToast(ToastType.Error, t('IMAGE_NOT_FOUND', 'Image not found'));
|
|
@@ -48,6 +48,7 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
48
48
|
const notificationSound = new Sound(theme.sounds.notification, '', () => { });
|
|
49
49
|
|
|
50
50
|
let _timeout: any = null
|
|
51
|
+
let times = 0
|
|
51
52
|
|
|
52
53
|
const handleCloseEvents = () => {
|
|
53
54
|
notificationSound.stop()
|
|
@@ -57,14 +58,19 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
57
58
|
|
|
58
59
|
const handlePlayNotificationSound = (eventObj: any = null) => {
|
|
59
60
|
setCurrentEvent(eventObj)
|
|
60
|
-
|
|
61
|
+
if (times > 0) {
|
|
62
|
+
if (times === 3) {
|
|
63
|
+
times = 0
|
|
64
|
+
return
|
|
65
|
+
}
|
|
66
|
+
return
|
|
67
|
+
}
|
|
61
68
|
_timeout = setInterval(() => {
|
|
62
|
-
if (times
|
|
69
|
+
if (times < SOUND_LOOP) {
|
|
63
70
|
notificationSound.play()
|
|
64
71
|
times++
|
|
65
72
|
} else {
|
|
66
73
|
clearInterval(_timeout)
|
|
67
|
-
times = 1
|
|
68
74
|
return
|
|
69
75
|
}
|
|
70
76
|
}, 2500)
|
|
@@ -89,10 +95,10 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
89
95
|
}
|
|
90
96
|
}
|
|
91
97
|
if (evtType === 3 || value.author_id === user.id) return
|
|
92
|
-
handlePlayNotificationSound({
|
|
98
|
+
setTimeout(() => handlePlayNotificationSound({
|
|
93
99
|
evt: evtType,
|
|
94
100
|
orderId: value?.driver ? value?.order_id : evtList[evtType].event === 'messages' ? value?.order?.id : value?.id
|
|
95
|
-
})
|
|
101
|
+
}), 1000)
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
useEffect(() => {
|
|
@@ -611,11 +611,11 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
611
611
|
? walletName[event?.wallet_event?.wallet?.type]?.name
|
|
612
612
|
: t(event?.paymethod?.name?.toUpperCase()?.replace(/ /g, '_'), event?.paymethod?.name)}
|
|
613
613
|
</OText>
|
|
614
|
-
{event?.data?.charge_id && (
|
|
614
|
+
{/* {event?.data?.charge_id && (
|
|
615
615
|
<OText>
|
|
616
616
|
{`${t('CODE', 'Code')}: ${event?.data?.charge_id}`}
|
|
617
617
|
</OText>
|
|
618
|
-
)}
|
|
618
|
+
)} */}
|
|
619
619
|
</View>
|
|
620
620
|
<OText>
|
|
621
621
|
{(event?.paymethod?.gateway === 'cash' && order?.cash)
|