Sidebar - Fix importing

This commit is contained in:
Robert committed 2022-08-20 10:43:51 +02:00
1 parent 340a309f9a
commit e99af6c44b
1 file changed
+10 -3
@@ -165,12 +165,19 @@ namespace Artemis.UI.Screens.Sidebar
return;
}
try
{
ProfileConfiguration profileConfiguration = _profileService.ImportProfile(_profileCategory, profileConfigurationExportModel);
// Remove the temporary profile configuration
_profileService.RemoveProfileConfiguration(_profileConfiguration);
// Import the new profile configuration
_profileService.ImportProfile(_profileCategory, profileConfigurationExportModel);
Close(_profileConfiguration);
Close(profileConfiguration);
}
catch (Exception e)
{
_windowService.ShowExceptionDialog("Import profile failed", e);
}
}
private async Task ExecuteDelete()