Devices - Reworking layout loading

This commit is contained in:
RobertBeekman committed 2024-01-09 21:27:51 +01:00
1 parent 9393bf2b68
commit e8590abd61
57 files changed
+824 -349

No files matched your search

@@ -46,7 +46,7 @@ public partial class InstalledTabItemViewModel : ViewModelBase
private async Task ExecuteViewLocal(CancellationToken cancellationToken)
{
if (InstalledEntry.EntryType == EntryType.Profile && Guid.TryParse(InstalledEntry.LocalReference, out Guid profileId))
if (InstalledEntry.EntryType == EntryType.Profile && InstalledEntry.TryGetMetadata("ProfileId", out Guid profileId))
{
await _router.Navigate($"profile-editor/{profileId}");
}
@@ -63,7 +63,7 @@ public partial class LayoutSelectionStepViewModel : SubmissionViewModel
try
{
ArtemisLayout layout = new(selected[0], LayoutSource.User);
ArtemisLayout layout = new(selected[0]);
if (!layout.IsValid)
{
await _windowService.ShowConfirmContentDialog("Failed to load layout", "The selected file does not appear to be a valid RGB.NET layout file.", "Close", null);