Skip to content

Commit

Permalink
chore: rename IFilePicker properties to avoid clash with preexisting …
Browse files Browse the repository at this point in the history
…public properties
  • Loading branch information
ramezgerges committed Feb 20, 2024
1 parent f166b7a commit e24264b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Uno.UI.Runtime.Skia.X11/LinuxFilePickerExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ public async Task<IReadOnlyList<string>> PickFilesAsync(CancellationToken token,
var requestPath2 = await fileChooser.OpenFileAsync(window, title, new Dictionary<string, object>
{
{ "handle_token", handleToken },
{ "accept_label", string.IsNullOrEmpty(picker.CommitButtonText) ? ResourceAccessor.GetLocalizedStringResource("FILE_PICKER_ACCEPT_LABEL") : picker.CommitButtonText },
{ "accept_label", string.IsNullOrEmpty(picker.CommitButtonTextInternal) ? ResourceAccessor.GetLocalizedStringResource("FILE_PICKER_ACCEPT_LABEL") : picker.CommitButtonTextInternal },
{ "multiple", multiple },
{ "directory", directory },
{ "filters", GetPortalFilters(picker.FileTypeFilter) },
{ "current_folder", Encoding.UTF8.GetBytes(PickerHelpers.GetInitialDirectory(picker.SuggestedStartLocation)).Append((byte)'\0') }
{ "filters", GetPortalFilters(picker.FileTypeFilterInternal) },
{ "current_folder", Encoding.UTF8.GetBytes(PickerHelpers.GetInitialDirectory(picker.SuggestedStartLocationInternal)).Append((byte)'\0') }
});

if (requestPath != requestPath2)
Expand Down
4 changes: 4 additions & 0 deletions src/Uno.UWP/Storage/Pickers/FileOpenPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public string CommitButtonText
set => _commitButtonText = value ?? throw new ArgumentNullException(nameof(value));
}

string IFilePicker.CommitButtonTextInternal => CommitButtonText;
PickerLocationId IFilePicker.SuggestedStartLocationInternal => PickerLocationId.DocumentsLibrary;
IList<string> IFilePicker.FileTypeFilterInternal => new FileExtensionVector();

#if __SKIA__ || __WASM__ || __IOS__ || __ANDROID__ || __MACOS__
public FileOpenPicker()
{
Expand Down
4 changes: 4 additions & 0 deletions src/Uno.UWP/Storage/Pickers/FolderPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public string CommitButtonText
set => _commitButtonText = value ?? throw new ArgumentNullException(nameof(value));
}

string IFilePicker.CommitButtonTextInternal => CommitButtonText;
PickerLocationId IFilePicker.SuggestedStartLocationInternal => PickerLocationId.DocumentsLibrary;
IList<string> IFilePicker.FileTypeFilterInternal => new FileExtensionVector();

#if __SKIA__ || __MACOS__ || __WASM__ || __IOS__ || __ANDROID__
public FolderPicker()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Uno.UWP/Storage/Pickers/IFilePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Windows.Storage.Pickers;

internal interface IFilePicker
{
string CommitButtonText { get; }
IList<string> FileTypeFilter { get; }
PickerLocationId SuggestedStartLocation { get; }
string CommitButtonTextInternal { get; }
IList<string> FileTypeFilterInternal { get; }
PickerLocationId SuggestedStartLocationInternal { get; }
}

0 comments on commit e24264b

Please sign in to comment.