mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 16:28:59 +00:00
[Glitch] Fix “Expand this post” link including user @undefined
Port 5429351889 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -24,6 +24,7 @@ import { openModal } from 'flavours/glitch/actions/modal';
|
|||||||
import { IconButton } from 'flavours/glitch/components/icon_button';
|
import { IconButton } from 'flavours/glitch/components/icon_button';
|
||||||
import { useIdentity } from 'flavours/glitch/identity_context';
|
import { useIdentity } from 'flavours/glitch/identity_context';
|
||||||
import { me } from 'flavours/glitch/initial_state';
|
import { me } from 'flavours/glitch/initial_state';
|
||||||
|
import type { Account } from 'flavours/glitch/models/account';
|
||||||
import type { Status } from 'flavours/glitch/models/status';
|
import type { Status } from 'flavours/glitch/models/status';
|
||||||
import { makeGetStatus } from 'flavours/glitch/selectors';
|
import { makeGetStatus } from 'flavours/glitch/selectors';
|
||||||
import type { RootState } from 'flavours/glitch/store';
|
import type { RootState } from 'flavours/glitch/store';
|
||||||
@@ -69,10 +70,7 @@ export const Footer: React.FC<{
|
|||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const getStatus = useMemo(() => makeGetStatus(), []) as GetStatusSelector;
|
const getStatus = useMemo(() => makeGetStatus(), []) as GetStatusSelector;
|
||||||
const status = useAppSelector((state) => getStatus(state, { id: statusId }));
|
const status = useAppSelector((state) => getStatus(state, { id: statusId }));
|
||||||
const accountId = status?.get('account') as string | undefined;
|
const account = status?.get('account') as Account | undefined;
|
||||||
const account = useAppSelector((state) =>
|
|
||||||
accountId ? state.accounts.get(accountId) : undefined,
|
|
||||||
);
|
|
||||||
const askReplyConfirmation = useAppSelector(
|
const askReplyConfirmation = useAppSelector(
|
||||||
(state) => (state.compose.get('text') as string).trim().length !== 0,
|
(state) => (state.compose.get('text') as string).trim().length !== 0,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user