feat(download): auto-categorize downloads into folders by file extension (#1572)

This commit is contained in:
WuFeng authored and GitHub committed 2026-10-23 20:38:25 +08:00
1 parent d125d4ab75
commit 9aae13453a
55 files changed
+4403 -217

No files matched your search

@@ -134,9 +134,13 @@ class _AppPathPickerFieldState extends State<AppPathPickerField> {
Future<void> _pickPlatformDirectory() async {
final path = await DownloadDirectoryPicker.pick(context, currentPath: widget.controller.text.trim());
if (!mounted || path == null || path.isEmpty || path == widget.controller.text) return;
widget.controller.text = path;
_syncTooltipPath(path);
if (!mounted || path == null || path.isEmpty) return;
if (path != widget.controller.text) {
widget.controller.text = path;
_syncTooltipPath(path);
}
// Picking a directory is an explicit choice even when the picked directory
// is the one already shown, so the callback always runs.
widget.onDirectoryPicked?.call(path);
}