fix reply hover blocking bug

merge-requests/1539/head
ewwwwwwww 2022-06-17 12:39:17 -07:00
rodzic cc7058349f
commit 3299d0b972
6 zmienionych plików z 11 dodań i 6 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ import { useDispatch } from 'react-redux';
import {
openStatusHoverCard,
closeStatusHoverCard,
} from 'soapbox/actions/status_hover_card';
} from 'soapbox/actions/status-hover-card';
import { isMobile } from 'soapbox/is_mobile';
const showStatusHoverCard = debounce((dispatch, ref, statusId) => {

Wyświetl plik

@ -8,15 +8,16 @@ import { fetchRelationships } from 'soapbox/actions/accounts';
import {
closeStatusHoverCard,
updateStatusHoverCard,
} from 'soapbox/actions/status_hover_card';
} from 'soapbox/actions/status-hover-card';
import ActionButton from 'soapbox/features/ui/components/action-button';
import BundleContainer from 'soapbox/features/ui/containers/bundle_container';
import { UserPanel } from 'soapbox/features/ui/util/async-components';
import StatusContainer from 'soapbox/containers/status_container';
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
import { makeGetStatus } from 'soapbox/selectors';
import { fetchStatus } from 'soapbox/actions/statuses';
import { showStatusHoverCard } from './hover_status_wrapper';
import { showStatusHoverCard } from './hover-status-wrapper';
import { Card, CardBody, Stack, Text } from './ui';
import type { AppDispatch } from 'soapbox/store';
@ -49,6 +50,10 @@ export const StatusHoverCard: React.FC<IStatusHoverCard> = ({ visible = true })
const statusId: string | undefined = useAppSelector(state => state.status_hover_card.statusId || undefined);
const targetRef = useAppSelector(state => state.status_hover_card.ref?.current);
useEffect(() => {
if (statusId) dispatch(fetchStatus(statusId));
}, [dispatch, statusId])
useEffect(() => {
const unlisten = history.listen(() => {
showStatusHoverCard.cancel();

Wyświetl plik

@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
import { openModal } from 'soapbox/actions/modals';
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
import HoverStatusWrapper from 'soapbox/components/hover_status_wrapper';
import HoverStatusWrapper from 'soapbox/components/hover-status-wrapper';
import { useAppDispatch } from 'soapbox/hooks';
import type { Account, Status } from 'soapbox/types/entities';

Wyświetl plik

@ -53,7 +53,7 @@ import security from './security';
import settings from './settings';
import sidebar from './sidebar';
import soapbox from './soapbox';
import status_hover_card from './status_hover_card';
import status_hover_card from './status-hover-card';
import status_lists from './status_lists';
import statuses from './statuses';
import suggestions from './suggestions';

Wyświetl plik

@ -4,7 +4,7 @@ import {
STATUS_HOVER_CARD_OPEN,
STATUS_HOVER_CARD_CLOSE,
STATUS_HOVER_CARD_UPDATE,
} from 'soapbox/actions/status_hover_card';
} from 'soapbox/actions/status-hover-card';
import type { AnyAction } from 'redux';