mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Update file picker to use async/await in ImageConvertViewModel
This commit is contained in:
@@ -1861,7 +1861,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
_aaruMetadata = null;
|
||||
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,
|
||||
AllowMultiple = false,
|
||||
@@ -1869,8 +1869,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
{
|
||||
FilePickerFileTypes.AaruMetadata
|
||||
}
|
||||
})
|
||||
.Result;
|
||||
});
|
||||
|
||||
if(result.Count != 1) return;
|
||||
|
||||
@@ -1906,7 +1905,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
_dumpHardware = null;
|
||||
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,
|
||||
AllowMultiple = false,
|
||||
@@ -1914,8 +1913,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
{
|
||||
FilePickerFileTypes.AaruResumeFile
|
||||
}
|
||||
})
|
||||
.Result;
|
||||
});
|
||||
|
||||
if(result.Count != 1) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user