Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Avalonia.Dialogs, added readonly to fields that are never modi… #13022

Merged
merged 4 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class ManagedFileChooserItemViewModel : AvaloniaDialogsInternalViewModelB
{
private string _displayName;
private string _path;
private DateTime _modified;
private DateTime _modified;
private string _type;
private long _size;
private ManagedFileChooserItemType _itemType;
Expand Down
3 changes: 2 additions & 1 deletion src/Avalonia.Dialogs/Internal/ManagedFileChooserSources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Avalonia.Controls.Platform;
using Avalonia.Utilities;


namespace Avalonia.Dialogs.Internal
{
internal class ManagedFileChooserSources
Expand All @@ -26,7 +27,7 @@ public static ManagedFileChooserNavigationItem[] DefaultGetAllItems(ManagedFileC
return sources.GetUserDirectories().Concat(sources.GetFileSystemRoots()).ToArray();
}

private static Environment.SpecialFolder[] s_folders = new[]
private static readonly Environment.SpecialFolder[] s_folders = new[]
{
Environment.SpecialFolder.Desktop,
Environment.SpecialFolder.UserProfile,
Expand Down
6 changes: 3 additions & 3 deletions src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public class ManagedFileChooserViewModel : AvaloniaDialogsInternalViewModelBase
string _fileName;
private bool _showHiddenFiles;
private ManagedFileChooserFilterViewModel _selectedFilter;
private bool _selectingDirectory;
private bool _savingFile;
private readonly bool _selectingDirectory;
private readonly bool _savingFile;
private bool _scheduledSelectionValidation;
private bool _alreadyCancelled = false;
private string _defaultExtension;
private bool _overwritePrompt;
private readonly bool _overwritePrompt;
private CompositeDisposable _disposables;

public string Location
Expand Down
Loading