@@ -33,7 +33,6 @@ public class ItemViewModel
3333 public EmptyFolderTextState TextState { get ; set ; } = new EmptyFolderTextState ( ) ;
3434 public BackState BS { get ; set ; } = new BackState ( ) ;
3535 public ForwardState FS { get ; set ; } = new ForwardState ( ) ;
36- public ProgressUIVisibility PVIS { get ; set ; } = new ProgressUIVisibility ( ) ;
3736
3837 private ObservableCollection < ListedItem > _filesAndFolders ;
3938 private ObservableCollection < ListedItem > _classicFileList ;
@@ -116,7 +115,7 @@ public async void AddItemsToCollectionAsync(string path, Page currentPage)
116115 Stopwatch stopwatch = new Stopwatch ( ) ;
117116 stopwatch . Start ( ) ;
118117
119- PVIS . isVisible = Visibility . Visible ;
118+ App . Loading . isVisible = Visibility . Visible ;
120119
121120 switch ( Universal . path )
122121 {
@@ -260,10 +259,10 @@ public async void AddItemsToCollectionAsync(string path, Page currentPage)
260259
261260 if ( ! _pageName . Contains ( "Classic" ) )
262261 {
263- PVIS . isVisible = Visibility . Collapsed ;
262+ App . Loading . isVisible = Visibility . Collapsed ;
264263 }
265264
266- PVIS . isVisible = Visibility . Collapsed ;
265+ App . Loading . isVisible = Visibility . Collapsed ;
267266 }
268267
269268 public static async void FillTreeNode ( object item , TreeView EntireControl )
@@ -439,6 +438,11 @@ private async void FileContentsChanged(IStorageQueryResultBase sender, object ar
439438 Debug . WriteLine ( "Filesystem change event fired. Refreshing..." ) ;
440439 }
441440
441+ await CoreApplication . MainView . CoreWindow . Dispatcher . RunAsync ( CoreDispatcherPriority . Normal ,
442+ ( ) =>
443+ {
444+ App . Loading . isVisible = Visibility . Visible ;
445+ } ) ;
442446 _filesRefreshing = true ;
443447
444448 //query options have to be reapplied otherwise old results are returned
@@ -489,6 +493,13 @@ await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPrio
489493 RemoveFileOrFolder ( toRemove ) ;
490494 } ) ;
491495 }
496+
497+ await CoreApplication . MainView . CoreWindow . Dispatcher . RunAsync ( CoreDispatcherPriority . Normal ,
498+ ( ) =>
499+ {
500+ App . Loading . isVisible = Visibility . Collapsed ;
501+ } ) ;
502+
492503 _filesRefreshing = false ;
493504 Debug . WriteLine ( "Filesystem refresh complete" ) ;
494505 }
0 commit comments