pl-fe: use tombstone for deleted posts
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
parent
6d103b8916
commit
9bb2a3a3fe
4 changed files with 34 additions and 34 deletions
|
@ -51,25 +51,23 @@ const exportFollows = () => async (_dispatch: AppDispatch, getState: () => RootS
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const exportBlocks = () => (_dispatch: AppDispatch, getState: () => RootState) => {
|
const exportBlocks = () => (_dispatch: AppDispatch, getState: () => RootState) =>
|
||||||
return getClient(getState()).filtering.getBlocks({ limit: 40 })
|
getClient(getState()).filtering.getBlocks({ limit: 40 })
|
||||||
.then(listAccounts)
|
.then(listAccounts)
|
||||||
.then((blocks) => {
|
.then((blocks) => {
|
||||||
fileExport(blocks.join('\n'), 'export_block.csv');
|
fileExport(blocks.join('\n'), 'export_block.csv');
|
||||||
|
|
||||||
toast.success(messages.blocksSuccess);
|
toast.success(messages.blocksSuccess);
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
const exportMutes = () => (_dispatch: AppDispatch, getState: () => RootState) => {
|
const exportMutes = () => (_dispatch: AppDispatch, getState: () => RootState) =>
|
||||||
return getClient(getState()).filtering.getMutes({ limit: 40 })
|
getClient(getState()).filtering.getMutes({ limit: 40 })
|
||||||
.then(listAccounts)
|
.then(listAccounts)
|
||||||
.then((mutes) => {
|
.then((mutes) => {
|
||||||
fileExport(mutes.join('\n'), 'export_mutes.csv');
|
fileExport(mutes.join('\n'), 'export_mutes.csv');
|
||||||
|
|
||||||
toast.success(messages.mutesSuccess);
|
toast.success(messages.mutesSuccess);
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
exportFollows,
|
exportFollows,
|
||||||
|
|
|
@ -328,31 +328,35 @@ const Thread: React.FC<IThread> = ({
|
||||||
|
|
||||||
const focusedStatus = (
|
const focusedStatus = (
|
||||||
<div className={clsx({ 'pb-4': hasDescendants })} key={status.id}>
|
<div className={clsx({ 'pb-4': hasDescendants })} key={status.id}>
|
||||||
<HotKeys handlers={handlers}>
|
{status.deleted ? (
|
||||||
<div
|
<Tombstone id={status.id} onMoveUp={handleMoveUp} onMoveDown={handleMoveDown} />
|
||||||
ref={statusRef}
|
) : (
|
||||||
className='focusable relative'
|
<HotKeys handlers={handlers}>
|
||||||
tabIndex={0}
|
<div
|
||||||
// FIXME: no "reblogged by" text is added for the screen reader
|
ref={statusRef}
|
||||||
aria-label={textForScreenReader(intl, status)}
|
className='focusable relative'
|
||||||
>
|
tabIndex={0}
|
||||||
|
// FIXME: no "reblogged by" text is added for the screen reader
|
||||||
|
aria-label={textForScreenReader(intl, status)}
|
||||||
|
>
|
||||||
|
|
||||||
<DetailedStatus
|
<DetailedStatus
|
||||||
status={status}
|
status={status}
|
||||||
withMedia={withMedia}
|
withMedia={withMedia}
|
||||||
onOpenCompareHistoryModal={handleOpenCompareHistoryModal}
|
onOpenCompareHistoryModal={handleOpenCompareHistoryModal}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<hr className='-mx-4 mb-2 max-w-[100vw] border-t-2 black:border-t dark:border-gray-800' />
|
<hr className='-mx-4 mb-2 max-w-[100vw] border-t-2 black:border-t dark:border-gray-800' />
|
||||||
|
|
||||||
<StatusActionBar
|
<StatusActionBar
|
||||||
status={status}
|
status={status}
|
||||||
expandable={isModal}
|
expandable={isModal}
|
||||||
space='lg'
|
space='lg'
|
||||||
withLabels
|
withLabels
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</HotKeys>
|
</HotKeys>
|
||||||
|
)}
|
||||||
|
|
||||||
{hasDescendants && (
|
{hasDescendants && (
|
||||||
<hr className='-mx-4 mt-2 max-w-[100vw] border-t-2 black:border-t dark:border-gray-800' />
|
<hr className='-mx-4 mt-2 max-w-[100vw] border-t-2 black:border-t dark:border-gray-800' />
|
||||||
|
|
|
@ -153,9 +153,8 @@ const useChatActions = (chatId: string) => {
|
||||||
.catch(() => null);
|
.catch(() => null);
|
||||||
|
|
||||||
const createChatMessage = useMutation({
|
const createChatMessage = useMutation({
|
||||||
mutationFn: ({ chatId, content, mediaId }: { chatId: string; content: string; mediaId?: string }) => {
|
mutationFn: ({ chatId, content, mediaId }: { chatId: string; content: string; mediaId?: string }) =>
|
||||||
return client.chats.createChatMessage(chatId, { content, media_id: mediaId });
|
client.chats.createChatMessage(chatId, { content, media_id: mediaId }),
|
||||||
},
|
|
||||||
retry: false,
|
retry: false,
|
||||||
onMutate: async (variables) => {
|
onMutate: async (variables) => {
|
||||||
// Cancel any outgoing refetches (so they don't overwrite our optimistic update)
|
// Cancel any outgoing refetches (so they don't overwrite our optimistic update)
|
||||||
|
|
|
@ -6,9 +6,8 @@ const useFetchRelationships = () => {
|
||||||
const client = useClient();
|
const client = useClient();
|
||||||
|
|
||||||
return useMutation({
|
return useMutation({
|
||||||
mutationFn: ({ accountIds }: { accountIds: string[]}) => {
|
mutationFn: ({ accountIds }: { accountIds: string[]}) =>
|
||||||
return client.accounts.getRelationships(accountIds);
|
client.accounts.getRelationships(accountIds),
|
||||||
},
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue