@@ -116,7 +116,7 @@ await DialogDisplayHelper.ShowDialogAsync(
116116
117117 #region Delete
118118
119- public async Task < ReturnResult > DeleteItemsAsync ( IEnumerable < IStorageItemWithPath > source , bool showDialog , bool permanently , bool registerHistory )
119+ public async Task < ReturnResult > DeleteItemsAsync ( IEnumerable < IStorageItemWithPath > source , DeleteConfirmationPolicies showDialog , bool permanently , bool registerHistory )
120120 {
121121 source = await source . ToListAsync ( ) ;
122122
@@ -125,7 +125,8 @@ public async Task<ReturnResult> DeleteItemsAsync(IEnumerable<IStorageItemWithPat
125125 var deleteFromRecycleBin = source . Select ( item => item . Path ) . Any ( path => RecycleBinHelpers . IsPathUnderRecycleBin ( path ) ) ;
126126 var canBeSentToBin = ! deleteFromRecycleBin && await RecycleBinHelpers . HasRecycleBin ( source . FirstOrDefault ( ) ? . Path ) ;
127127
128- if ( showDialog )
128+ if ( showDialog is DeleteConfirmationPolicies . Always
129+ || showDialog is DeleteConfirmationPolicies . PermanentOnly && ( permanently || ! canBeSentToBin ) )
129130 {
130131 var incomingItems = new List < BaseFileSystemDialogItemViewModel > ( ) ;
131132 List < ShellFileItem > ? binItems = null ;
@@ -193,13 +194,13 @@ public async Task<ReturnResult> DeleteItemsAsync(IEnumerable<IStorageItemWithPat
193194 return returnStatus ;
194195 }
195196
196- public Task < ReturnResult > DeleteItemAsync ( IStorageItemWithPath source , bool showDialog , bool permanently , bool registerHistory )
197+ public Task < ReturnResult > DeleteItemAsync ( IStorageItemWithPath source , DeleteConfirmationPolicies showDialog , bool permanently , bool registerHistory )
197198 => DeleteItemsAsync ( source . CreateEnumerable ( ) , showDialog , permanently , registerHistory ) ;
198199
199- public Task < ReturnResult > DeleteItemsAsync ( IEnumerable < IStorageItem > source , bool showDialog , bool permanently , bool registerHistory )
200+ public Task < ReturnResult > DeleteItemsAsync ( IEnumerable < IStorageItem > source , DeleteConfirmationPolicies showDialog , bool permanently , bool registerHistory )
200201 => DeleteItemsAsync ( source . Select ( ( item ) => item . FromStorageItem ( ) ) , showDialog , permanently , registerHistory ) ;
201202
202- public Task < ReturnResult > DeleteItemAsync ( IStorageItem source , bool showDialog , bool permanently , bool registerHistory )
203+ public Task < ReturnResult > DeleteItemAsync ( IStorageItem source , DeleteConfirmationPolicies showDialog , bool permanently , bool registerHistory )
203204 => DeleteItemAsync ( source . FromStorageItem ( ) , showDialog , permanently , registerHistory ) ;
204205
205206 #endregion Delete
@@ -258,7 +259,7 @@ public async Task<ReturnResult> PerformOperationTypeAsync(DataPackageOperation o
258259 }
259260 if ( destination . StartsWith ( CommonPaths . RecycleBinPath , StringComparison . Ordinal ) )
260261 {
261- return await RecycleItemsFromClipboard ( packageView , destination , UserSettingsService . FoldersSettingsService . ShowConfirmDeleteDialog , registerHistory ) ;
262+ return await RecycleItemsFromClipboard ( packageView , destination , UserSettingsService . FoldersSettingsService . DeleteConfirmationPolicy , registerHistory ) ;
262263 }
263264 else if ( operation . HasFlag ( DataPackageOperation . Copy ) )
264265 {
@@ -625,7 +626,7 @@ public async Task<ReturnResult> CreateShortcutFromClipboard(DataPackageView pack
625626 return returnStatus ;
626627 }
627628
628- public async Task < ReturnResult > RecycleItemsFromClipboard ( DataPackageView packageView , string destination , bool showDialog , bool registerHistory )
629+ public async Task < ReturnResult > RecycleItemsFromClipboard ( DataPackageView packageView , string destination , DeleteConfirmationPolicies showDialog , bool registerHistory )
629630 {
630631 if ( ! HasDraggedStorageItems ( packageView ) )
631632 {
0 commit comments