Update CompanionDelegates.tsx

This commit is contained in:
Marcos Rodriguez Velez 2024-11-08 19:25:32 -04:00
parent 1c8b0908b2
commit 68f53d48d0

View file

@ -18,6 +18,7 @@ import { useStorage } from '../hooks/context/useStorage';
import RNQRGenerator from 'rn-qr-generator';
import presentAlert from './Alert';
import useMenuElements from '../hooks/useMenuElements';
import { useSettings } from '../hooks/context/useSettings';
const DeviceQuickActions = lazy(() => import('../components/DeviceQuickActions'));
const HandOffComponentListener = lazy(() => import('../components/HandOffComponentListener'));
@ -32,6 +33,7 @@ const ClipboardContentType = Object.freeze({
const CompanionDelegates = () => {
const { wallets, addWallet, saveToDisk, fetchAndSaveWalletTransactions, refreshAllWalletTransactions, setSharedCosigner } = useStorage();
const appState = useRef<AppStateStatus>(AppState.currentState);
const { isHandOffUseEnabled, isQuickActionsEnabled, isWidgetBalanceDisplayAllowed } = useSettings();
const clipboardContent = useRef<undefined | string>();
useMenuElements();
@ -244,9 +246,9 @@ const CompanionDelegates = () => {
<>
<Notifications onProcessNotifications={processPushNotifications} />
<Suspense fallback={null}>
<DeviceQuickActions />
<HandOffComponentListener />
<WidgetCommunication />
{isQuickActionsEnabled && <DeviceQuickActions />}
{isHandOffUseEnabled && <HandOffComponentListener />}
{isWidgetBalanceDisplayAllowed && <WidgetCommunication />}
<WatchConnectivity />
</Suspense>
</>