Skip to content

Commit

Permalink
Hide Separate Threads & Forum Posts export option for DM exports.
Browse files Browse the repository at this point in the history
  • Loading branch information
prathercc committed Jul 16, 2024
1 parent cdb79e7 commit 5a03e2d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"Prevent ghost files from being created when no messages are available for export.",
"Apply Advanced Filters to multi-Channel exports.",
"Show Channel name on thread/forum post messages in Guild exports.",
"Fix issue where standard emojis were not rendered properly in reaction dialog."
"Fix issue where standard emojis were not rendered properly in reaction dialog.",
"Hide Separate Threads & Forum Posts export option for DM exports."
]
},
{
Expand Down
9 changes: 7 additions & 2 deletions src/containers/export-button/components/default-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ import SeparateThreadToggle from "./separate-thread-toggle";
type DefaultContentProps = {
isExporting: boolean;
messageCount: number;
isDm: boolean;
};

const DefaultContent = ({ isExporting, messageCount }: DefaultContentProps) => {
const DefaultContent = ({
isExporting,
messageCount,
isDm,
}: DefaultContentProps) => {
const theme = useTheme();

return (
Expand All @@ -42,7 +47,7 @@ const DefaultContent = ({ isExporting, messageCount }: DefaultContentProps) => {
>
<Typography variant="body2">Export Options</Typography>
<Stack direction="row" alignItems="center" spacing={1}>
<SeparateThreadToggle />
{!isDm && <SeparateThreadToggle />}
<ArtistModeToggle />
<PreviewImageToggle />
<ImageToggle />
Expand Down
1 change: 1 addition & 0 deletions src/containers/export-button/export-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const ExportButton = ({
} else
return (
<DefaultContent
isDm={isDm}
isExporting={isExporting}
messageCount={
filters.length ? filteredMessages?.length : messages.length
Expand Down

0 comments on commit 5a03e2d

Please sign in to comment.