File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,9 @@ public sealed class RecycleBinLocationItem : LocationItem
128128
129129 public async void RefreshSpaceUsed ( object ? sender , FileSystemEventArgs e )
130130 {
131- await MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( ( ) =>
131+ await MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( async ( ) =>
132132 {
133- SpaceUsed = StorageTrashBinService . GetSize ( ) ;
133+ SpaceUsed = await Task . Run ( ( ) => StorageTrashBinService . GetSize ( ) ) ;
134134 } ) ;
135135 }
136136
@@ -152,10 +152,10 @@ public override object ToolTip
152152
153153 public RecycleBinLocationItem ( )
154154 {
155- SpaceUsed = StorageTrashBinService . GetSize ( ) ;
156-
157155 StorageTrashBinService . Watcher . ItemAdded += RefreshSpaceUsed ;
158156 StorageTrashBinService . Watcher . ItemDeleted += RefreshSpaceUsed ;
157+
158+ RefreshSpaceUsed ( null , new ( WatcherChangeTypes . Changed , "" , null ) ) ;
159159 }
160160 }
161161}
You can’t perform that action at this time.
0 commit comments