From c832088d899e4a9cdf2f4af2d69e98fc38d0ea44 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Mon, 5 Feb 2024 16:41:44 -0300 Subject: [PATCH] minor tweaks --- app/lib/services/restApi.ts | 1 + app/views/PushTroubleshootView/index.tsx | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/lib/services/restApi.ts b/app/lib/services/restApi.ts index 4451f17fc..47c367508 100644 --- a/app/lib/services/restApi.ts +++ b/app/lib/services/restApi.ts @@ -905,6 +905,7 @@ export const removePushToken = (): Promise => { return Promise.resolve(); }; +// RC 6.6.0 export const pushTest = () => sdk.post('push.test'); // RC 6.5.0 diff --git a/app/views/PushTroubleshootView/index.tsx b/app/views/PushTroubleshootView/index.tsx index e697ac1a8..e8ccd3aac 100644 --- a/app/views/PushTroubleshootView/index.tsx +++ b/app/views/PushTroubleshootView/index.tsx @@ -22,8 +22,9 @@ interface IPushTroubleshootViewProps { const PushTroubleshootView = ({ navigation }: IPushTroubleshootViewProps): JSX.Element => { const { colors } = useTheme(); - const dispatch = useDispatch(); + const [testPushNotificationsPermission] = usePermissions(['test-push-notifications']); + const { deviceNotificationEnabled, defaultPushGateway, pushGatewayEnabled, foreground, serverVersion } = useAppSelector( state => ({ deviceNotificationEnabled: state.troubleshootingNotification.deviceNotificationEnabled, @@ -34,8 +35,6 @@ const PushTroubleshootView = ({ navigation }: IPushTroubleshootViewProps): JSX.E }) ); - const [testPushNotificationsPermission] = usePermissions(['test-push-notifications']); - useEffect(() => { if (foreground) { dispatch(requestTroubleshootingNotification());