Skip to content

Commit

Permalink
Use array initializers in more places
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Apr 14, 2024
1 parent 4b23c40 commit 00e4895
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SettingsService settingsService
public ObservableCollection<IVideo> SelectedVideos { get; } = [];

public IReadOnlyList<Container> AvailableContainers { get; } =
new[] { Container.Mp4, Container.WebM, Container.Mp3, new Container("ogg") };
[Container.Mp4, Container.WebM, Container.Mp3, new Container("ogg")];

public IReadOnlyList<VideoQualityPreference> AvailableVideoQualityPreferences { get; } =
Enum.GetValues<VideoQualityPreference>().Reverse().ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ private async Task ConfirmAsync()
var container = SelectedDownloadOption.Container;

var filePath = await dialogManager.PromptSaveFilePathAsync(
new[]
{
[
new FilePickerFileType($"{container.Name} file")
{
Patterns = new[] { $"*.{container.Name}" }
Patterns = [$"*.{container.Name}"]
}
},
],
FileNameTemplate.Apply(settingsService.FileNameTemplate, Video, container)
);

Expand Down

0 comments on commit 00e4895

Please sign in to comment.