Skip to content

Commit 7b2114e

Browse files
author
David Khristepher Santos
committed
Fix Remove folders
1 parent 6336b15 commit 7b2114e

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

Diffusion.Toolkit/Models/FolderViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ public bool IsRecursive
8181
set => SetField(ref field, value);
8282
}
8383

84+
public bool ForRemoval { get; set; }
85+
8486
public bool IsScanned
8587
{
8688
get => _isScanned;

Diffusion.Toolkit/Release Notes/What's New v1.10.0.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
## Updated to .NET 10
44

5+
Diffusion Toolkit is now compiled with .NET 10
6+
57
Download and install the [.NET Desktop Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
68

79
## (Experimental) Video Support
810

911
This version adds support for indexing and previewing videos.
1012

11-
The ".mp4" extension has been added to Settings > General > File Extensions.
13+
The ".mp4" extension will be added to Settings > General > File Extensions. You can Rescan any folders containing images. Any new scans should include MP4 files.
1214

1315
A new setting has been added: Settings > Video > Loop Video
1416

@@ -24,11 +26,13 @@ You can also filter by one or more tags in the Tags filter panel on the left.
2426

2527
You can add, rename and remove tags in the Tags filter panel.
2628

29+
The Tags filter should be visible. You can toggle it via Menu > View > Tags
2730

2831
## Others
2932

3033
* Add support for ComfyUI workflows in JPEG files
3134
* Fixed errors reading Seed values larger than max INT
35+
* Fixed issues with Remove folders in Folder panel
3236

3337

3438

Diffusion.Toolkit/Services/FolderService.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ private void UpdateFolder2(FolderViewModel folderView, Dictionary<string, Folder
373373
{
374374
folderView.HasChildren = Directory.GetDirectories(folderView.Path, "*").Length > 0;
375375
}
376-
376+
377377
if (folderView.State == FolderState.Expanded)
378378
{
379379
var diskSubFolders = GetDiskSubFolders(folderView);
@@ -400,7 +400,7 @@ private void UpdateFolder2(FolderViewModel folderView, Dictionary<string, Folder
400400

401401
foreach (var child in folderView.Children.ToList())
402402
{
403-
if (!Directory.Exists(child.Path) && !child.IsScanned)
403+
if (!Directory.Exists(child.Path) && (!child.IsScanned || child.ForRemoval))
404404
{
405405
var grandChildren = GetVisualChildren(child).ToList();
406406

@@ -1074,6 +1074,8 @@ public async Task<bool> ShowRemoveFolderDialog(FolderViewModel folder)
10741074
{
10751075
ServiceLocator.DataStore.RemoveFolder(folder.Id);
10761076

1077+
folder.ForRemoval = true;
1078+
10771079
await LoadFolders();
10781080

10791081
ServiceLocator.SearchService.ExecuteSearch();

0 commit comments

Comments
 (0)