Skip to content

Commit bad3dd5

Browse files
ManuZhu0728qu1ck
authored andcommitted
Fix: Update TorrentLocation disabled logic to check pre-defined directories
1 parent 9b257d7 commit bad3dd5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/modals/common.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,14 @@ export function TorrentLocation(props: LocationData) {
182182
<Menu position="left-start" withinPortal returnFocus
183183
middlewares={{ shift: true, flip: false }} offset={{ mainAxis: -20, crossAxis: 30 }}>
184184
<Menu.Target>
185-
<ActionIcon py="md" disabled={props.disabled === true || props.lastPaths.length === 0}>
185+
<ActionIcon
186+
py="md"
187+
disabled={
188+
props.disabled === true ||
189+
(props.lastPaths.length === 0 &&
190+
config.values.interface.preconfiguredDirs.length === 0)
191+
}
192+
>
186193
<Icon.ClockHistory size="16" />
187194
</ActionIcon>
188195
</Menu.Target>

0 commit comments

Comments
 (0)