[GUI] Update file picker to use async/await in ImageConvertViewModel

This commit is contained in:
2025-10-27 00:32:50 +00:00
parent a9da669350
commit 4d59b13307

View File

@@ -1861,7 +1861,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
_aaruMetadata = null; _aaruMetadata = null;
MetadataJsonText = ""; MetadataJsonText = "";
IReadOnlyList<IStorageFile> result = _view.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions IReadOnlyList<IStorageFile> result = await _view.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{ {
Title = UI.Dialog_Choose_existing_metadata_sidecar, Title = UI.Dialog_Choose_existing_metadata_sidecar,
AllowMultiple = false, AllowMultiple = false,
@@ -1869,8 +1869,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
{ {
FilePickerFileTypes.AaruMetadata FilePickerFileTypes.AaruMetadata
} }
}) });
.Result;
if(result.Count != 1) return; if(result.Count != 1) return;
@@ -1906,7 +1905,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
_dumpHardware = null; _dumpHardware = null;
ResumeFileText = ""; ResumeFileText = "";
IReadOnlyList<IStorageFile> result = _view.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions IReadOnlyList<IStorageFile> result = await _view.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{ {
Title = UI.Dialog_Choose_existing_resume_file, Title = UI.Dialog_Choose_existing_resume_file,
AllowMultiple = false, AllowMultiple = false,
@@ -1914,8 +1913,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
{ {
FilePickerFileTypes.AaruResumeFile FilePickerFileTypes.AaruResumeFile
} }
}) });
.Result;
if(result.Count != 1) return; if(result.Count != 1) return;