File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 10
10
using Windows . ApplicationModel . AppService ;
11
11
using Windows . ApplicationModel . Core ;
12
12
using Windows . Foundation . Collections ;
13
+ using Windows . UI . Core ;
13
14
using Windows . UI . Xaml ;
14
15
using Windows . UI . Xaml . Controls ;
15
16
using Windows . UI . Xaml . Navigation ;
@@ -111,14 +112,19 @@ await CoreApplication.MainView.DispatcherQueue.EnqueueAsync(() =>
111
112
112
113
private async Task RestoreDefaultIcon ( )
113
114
{
115
+ RestoreDefaultButton . IsEnabled = false ;
116
+
114
117
var setIconTask = IsShortcutItem ?
115
118
SetCustomFileIcon ( selectedItemPath , null ) :
116
119
SetCustomFolderIcon ( selectedItemPath , null ) ;
117
120
if ( await setIconTask )
118
121
{
119
122
await CoreApplication . MainView . DispatcherQueue . EnqueueAsync ( ( ) =>
120
123
{
121
- appInstance ? . FilesystemViewModel ? . RefreshItems ( null ) ;
124
+ appInstance ? . FilesystemViewModel ? . RefreshItems ( null , async ( ) =>
125
+ {
126
+ await Dispatcher . RunAsync ( CoreDispatcherPriority . Normal , ( ) => RestoreDefaultButton . IsEnabled = true ) ;
127
+ } ) ;
122
128
} ) ;
123
129
}
124
130
}
You can’t perform that action at this time.
0 commit comments