Merge pull request #1716 from Bilb/fix-spinner-onion

fix spinner for onion path loading dialog
pull/1717/head
Audric Ackermann 4 years ago committed by GitHub
commit 35b55df180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 <SessionSpinner loading={true} />;
}

@ -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 {

@ -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';

Loading…
Cancel
Save