From 7fadfac7dcc7fdeb1bed4243b61b77781f2d62e5 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 24 Jun 2021 12:59:34 +1000 Subject: [PATCH] fix spinner for onion path loading dialog --- .../{OnionStatusDialog.tsx => OnionStatusPathDialog.tsx} | 6 +++--- ts/components/session/ActionsPanel.tsx | 2 +- ts/components/session/ModalContainer.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename ts/components/{OnionStatusDialog.tsx => OnionStatusPathDialog.tsx} (96%) diff --git a/ts/components/OnionStatusDialog.tsx b/ts/components/OnionStatusPathDialog.tsx similarity index 96% rename from ts/components/OnionStatusDialog.tsx rename to ts/components/OnionStatusPathDialog.tsx index f927f2fe8..bfdbc88c3 100644 --- a/ts/components/OnionStatusDialog.tsx +++ b/ts/components/OnionStatusPathDialog.tsx @@ -11,7 +11,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { StateType } from '../state/reducer'; import { SessionIcon, SessionIconButton, SessionIconSize, SessionIconType } from './session/icon'; -import { SessionWrapperModal } from '../components/session/SessionWrapperModal'; +import { SessionWrapperModal } from './session/SessionWrapperModal'; import ip2country from 'ip2country'; import countryLookup from 'country-code-lookup'; @@ -38,8 +38,8 @@ const OnionPathModalInner = () => { const onionPath = useSelector(getFirstOnionPath); // including the device and destination in calculation const glowDuration = onionPath.length + 2; - - if (!onionPath) { + console.warn('onionPath', onionPath); + if (!onionPath || onionPath.length === 0) { return ; } diff --git a/ts/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx index 45910298b..62dc37126 100644 --- a/ts/components/session/ActionsPanel.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -45,7 +45,7 @@ import { FSv2 } from '../../fileserver'; import { debounce } from 'lodash'; import { DURATION } from '../../session/constants'; import { actions as conversationActions } from '../../state/ducks/conversations'; -import { ActionPanelOnionStatusLight, OnionPathModal } from '../OnionStatusDialog'; +import { ActionPanelOnionStatusLight, OnionPathModal } from '../OnionStatusPathDialog'; import { EditProfileDialog } from '../EditProfileDialog'; import { SessionConfirm } from './SessionConfirm'; import { diff --git a/ts/components/session/ModalContainer.tsx b/ts/components/session/ModalContainer.tsx index 5560a7617..a5dfe0a21 100644 --- a/ts/components/session/ModalContainer.tsx +++ b/ts/components/session/ModalContainer.tsx @@ -22,7 +22,7 @@ import { RemoveModeratorsDialog } from '../conversation/ModeratorsRemoveDialog'; import { UpdateGroupMembersDialog } from '../conversation/UpdateGroupMembersDialog'; import { UpdateGroupNameDialog } from '../conversation/UpdateGroupNameDialog'; import { EditProfileDialog } from '../EditProfileDialog'; -import { OnionPathModal } from '../OnionStatusDialog'; +import { OnionPathModal } from '../OnionStatusPathDialog'; import { UserDetailsDialog } from '../UserDetailsDialog'; import { SessionConfirm } from './SessionConfirm'; import { SessionNicknameDialog } from './SessionNicknameDialog';