remove haptic from inappnotification

This commit is contained in:
Reinaldo Neto 2024-01-10 21:32:36 -03:00
parent e5a2a296c2
commit 4d8562628e
1 changed files with 1 additions and 12 deletions

View File

@ -1,14 +1,11 @@
import React, { ElementType, memo, useEffect } from 'react';
import { Easing, Notifier, NotifierRoot } from 'react-native-notifier';
import * as Haptics from 'expo-haptics';
import NotifierComponent, { INotifierComponent } from './NotifierComponent';
import EventEmitter from '../../lib/methods/helpers/events';
import Navigation from '../../lib/navigation/appNavigation';
import { getActiveRoute } from '../../lib/methods/helpers/navigation';
import { useAppSelector } from '../../lib/hooks';
import userPreferences from '../../lib/methods/userPreferences';
import { NOTIFICATION_IN_APP_VIBRATION } from '../../lib/constants';
export const INAPP_NOTIFICATION_EMITTER = 'NotificationInApp';
@ -33,15 +30,7 @@ const InAppNotification = memo(() => {
const state = Navigation.navigationRef.current?.getRootState();
const route = getActiveRoute(state);
if (payload?.rid || notification.customNotification) {
if (route?.name === 'JitsiMeetView' || payload?.message?.t === 'videoconf') return;
if (payload?.rid === subscribedRoom) {
const notificationInAppVibration = userPreferences.getBool(NOTIFICATION_IN_APP_VIBRATION);
if (notificationInAppVibration || notificationInAppVibration === null) {
Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
}
return;
}
if (payload?.rid === subscribedRoom || route?.name === 'JitsiMeetView' || payload?.message?.t === 'videoconf') return;
Notifier.showNotification({
showEasing: Easing.inOut(Easing.quad),