Rocket.Chat.ReactNative/patches/react-native-notifier+1.6.1...

50 lines
2.1 KiB
Diff
Raw Permalink Normal View History

feat: Add caller and ringer to video conf calls (#5046) * add expo camera and use camera on call init action sheet * fix permissions * set colors when calling * update @react-native-community/hooks lib * move to useWindowDimensions * create action to handle video-conf calls * create videoConf reducer * add typed-redux-saga lib * fix return * change videoConf saga to TS * fix TS target * update action and types * create actionSheetRef * add notifyUser api * export video conf types * add action prop * use new reducer prop * add videoConferenceCancel and add allowRinging to videoConferenceStart * temp-patch * add locales * add handler to videoconf message * fix rest types * add message types * path to remove component from dom * remove notification when is videoconf * create sound hook * create dots loader * update call translation * the end is near * move to confirmed * better code reading * fix call type * fix tests * update podfile * wip * fix call order * move colors * move to jsx * fix colors * add pt-br * remove patch and point * fix colors * fix expo camera * move to style * remove unused styles * update types and style * wip * rename IncomingCallComponent * add custom notification * wip * fix naming * fix styles * fix import * fix styles * change colors * fixa ringing * fix import * organize * fix sizes * use realName * fix spacing * fix icon size * fix header gap * changeColor * fix safeArea * set calling only on direct calls * change ringer to be a component * cancel call on swipe * remove join on direct calls * add props * update package
2023-07-04 00:03:39 +00:00
diff --git a/node_modules/react-native-notifier/src/Notifier.tsx b/node_modules/react-native-notifier/src/Notifier.tsx
index 56c5819..4f31e78 100644
--- a/node_modules/react-native-notifier/src/Notifier.tsx
+++ b/node_modules/react-native-notifier/src/Notifier.tsx
@@ -44,6 +44,7 @@ export class NotifierRoot extends React.PureComponent<ShowNotificationParams, St
Component: NotificationComponent,
swipeEnabled: DEFAULT_SWIPE_ENABLED,
componentProps: {},
+ visible: false,
};
this.isShown = false;
this.isHiding = false;
@@ -146,6 +147,7 @@ export class NotifierRoot extends React.PureComponent<ShowNotificationParams, St
Component: Component ?? NotificationComponent,
swipeEnabled: swipeEnabled ?? DEFAULT_SWIPE_ENABLED,
componentProps: componentProps,
+ visible: true,
});
this.showParams = restParams;
@@ -188,6 +190,7 @@ export class NotifierRoot extends React.PureComponent<ShowNotificationParams, St
}
private onHidden() {
+ this.setState({ visible: false })
this.showParams?.onHidden?.();
this.isShown = false;
this.isHiding = false;
@@ -259,7 +262,7 @@ export class NotifierRoot extends React.PureComponent<ShowNotificationParams, St
>
<TouchableWithoutFeedback onPress={this.onPress}>
<View onLayout={this.onLayout}>
- <Component title={title} description={description} {...componentProps} />
+ {this.state.visible? <Component title={title} description={description} {...componentProps} /> : null}
</View>
</TouchableWithoutFeedback>
</Animated.View>
diff --git a/node_modules/react-native-notifier/src/types.ts b/node_modules/react-native-notifier/src/types.ts
index 229e19c..e16a943 100644
--- a/node_modules/react-native-notifier/src/types.ts
+++ b/node_modules/react-native-notifier/src/types.ts
@@ -95,6 +95,7 @@ export interface StateInterface {
swipeEnabled: boolean;
Component: ElementType;
componentProps: Record<string, any>;
+ visible: boolean;
}
export interface NotifierInterface {