From 729bc4ad8bff880e9c2709945fc10632a01dde3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Mon, 16 Sep 2024 13:19:19 +0200 Subject: [PATCH] Add review changes --- src/libs/Notification/PushNotification/index.native.ts | 2 ++ src/libs/actions/Session/index.ts | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/Notification/PushNotification/index.native.ts b/src/libs/Notification/PushNotification/index.native.ts index 334317ec5d0a..448365c1cd1d 100644 --- a/src/libs/Notification/PushNotification/index.native.ts +++ b/src/libs/Notification/PushNotification/index.native.ts @@ -2,6 +2,7 @@ import type {PushPayload} from '@ua/react-native-airship'; import Airship, {EventType} from '@ua/react-native-airship'; import Onyx from 'react-native-onyx'; import Log from '@libs/Log'; +import ShortcutManager from '@libs/ShortcutManager'; import * as PushNotificationActions from '@userActions/PushNotification'; import ONYXKEYS from '@src/ONYXKEYS'; import ForegroundNotifications from './ForegroundNotifications'; @@ -139,6 +140,7 @@ const deregister: Deregister = () => { Airship.removeAllListeners(EventType.PushReceived); Airship.removeAllListeners(EventType.NotificationResponse); ForegroundNotifications.disableForegroundNotifications(); + ShortcutManager.removeAllDynamicShortcuts(); }; /** diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index de2cd60ece39..ab209e9bf928 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -36,7 +36,6 @@ import NetworkConnection from '@libs/NetworkConnection'; import * as Pusher from '@libs/Pusher/pusher'; import * as ReportUtils from '@libs/ReportUtils'; import * as SessionUtils from '@libs/SessionUtils'; -import ShortcutManager from '@libs/ShortcutManager'; import Timers from '@libs/Timers'; import {hideContextMenu} from '@pages/home/report/ContextMenu/ReportActionContextMenu'; import {KEYS_TO_PRESERVE, openApp} from '@userActions/App'; @@ -206,7 +205,6 @@ function hasAuthToken(): boolean { function signOutAndRedirectToSignIn(shouldResetToHome?: boolean, shouldStashSession?: boolean, killHybridApp = true) { Log.info('Redirecting to Sign In because signOut() was called'); hideContextMenu(false); - ShortcutManager.removeAllDynamicShortcuts(); if (!isAnonymousUser()) { // In the HybridApp, we want the Old Dot to handle the sign out process if (NativeModules.HybridAppModule && killHybridApp) {