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

Sidebar - Fix the position of new profiles

This commit is contained in:
Robert 2022-03-09 19:10:38 +01:00
parent 5e4fd1de8b
commit 4c274a1749
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ namespace Artemis.UI.Screens.Sidebar
if (result != null)
{
SidebarProfileConfigurationViewModel viewModel = _vmFactory.SidebarProfileConfigurationViewModel(_sidebarViewModel, result);
ProfileConfigurations.Add(viewModel);
ProfileConfigurations.Insert(0, viewModel);
SelectedProfileConfiguration = viewModel;
}
}

View File

@ -52,12 +52,12 @@ namespace Artemis.UI.Screens.Sidebar
public async Task ExecuteEditProfile()
{
ProfileConfiguration? deleted = await _windowService.ShowDialogAsync<ProfileConfigurationEditViewModel, ProfileConfiguration?>(
ProfileConfiguration? edited = await _windowService.ShowDialogAsync<ProfileConfigurationEditViewModel, ProfileConfiguration?>(
("profileCategory", ProfileConfiguration.Category),
("profileConfiguration", ProfileConfiguration)
);
if (deleted != null)
if (edited != null)
_sidebarViewModel.UpdateProfileCategories();
}
}