Skip to content

Commit 534b131

Browse files
committed
Feat | DownloadLocal
1 parent a28ca37 commit 534b131

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

ShadowViewer/Services/FilePickerService.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public async Task<IReadOnlyList<StorageFile>> PickMultipleFilesAsync(
126126

127127
/// <inheritdoc />
128128
public async Task<StorageFile?> PickSaveFileAsync(
129+
IDictionary<string, IList<string>> fileTypeChoices,
129130
string? suggestedFileName = null,
130-
IDictionary<string, IList<string>>? fileTypeChoices = null,
131131
PickerLocationId suggestedStartLocation = PickerLocationId.DocumentsLibrary,
132132
string? settingsIdentifier = null)
133133
{
@@ -146,16 +146,9 @@ public async Task<IReadOnlyList<StorageFile>> PickMultipleFilesAsync(
146146
picker.SuggestedFileName = suggestedFileName;
147147
}
148148

149-
if (fileTypeChoices == null || fileTypeChoices.Count == 0)
149+
foreach (var choice in fileTypeChoices)
150150
{
151-
picker.FileTypeChoices.Add("All Files", new List<string> { "*" });
152-
}
153-
else
154-
{
155-
foreach (var choice in fileTypeChoices)
156-
{
157-
picker.FileTypeChoices.Add(choice.Key, choice.Value);
158-
}
151+
picker.FileTypeChoices.Add(choice.Key, choice.Value);
159152
}
160153

161154
var resultSource = new TaskCompletionSource<IStorageItem?>();

0 commit comments

Comments
 (0)