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;
|
_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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user