1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Sidebar - Fix importing

This commit is contained in:
Robert 2022-08-20 10:42:56 +02:00
parent 4722aa413b
commit 3257f94548

View File

@ -165,12 +165,19 @@ namespace Artemis.UI.Screens.Sidebar
return;
}
// Remove the temporary profile configuration
_profileService.RemoveProfileConfiguration(_profileConfiguration);
// Import the new profile configuration
_profileService.ImportProfile(_profileCategory, profileConfigurationExportModel);
Close(_profileConfiguration);
try
{
ProfileConfiguration profileConfiguration = _profileService.ImportProfile(_profileCategory, profileConfigurationExportModel);
// Remove the temporary profile configuration
_profileService.RemoveProfileConfiguration(_profileConfiguration);
Close(profileConfiguration);
}
catch (Exception e)
{
_windowService.ShowExceptionDialog("Import profile failed", e);
}
}
private async Task ExecuteDelete()