Storage - Fix profile order not loading/saving

This commit is contained in:
Robert committed 2024-03-15 23:41:00 +01:00
1 parent 8d7af6bb85
commit 4c2eca29cc
1 file changed
+4 -1
@@ -167,7 +167,7 @@ public class ProfileCategory : CorePropertyChanged, IStorageModel
IsSuspended = Entity.IsSuspended;
Order = Entity.Order;
ProfileConfigurations = new ReadOnlyCollection<ProfileConfiguration>(Entity.ProfileConfigurations.Select(pc => new ProfileConfiguration(this, pc)).ToList());
ProfileConfigurations = new ReadOnlyCollection<ProfileConfiguration>(Entity.ProfileConfigurations.Select(pc => new ProfileConfiguration(this, pc)).OrderBy(pc => pc.Order).ToList());
}
/// <inheritdoc />
@@ -180,7 +180,10 @@ public class ProfileCategory : CorePropertyChanged, IStorageModel
Entity.ProfileConfigurations.Clear();
foreach (ProfileConfiguration profileConfiguration in ProfileConfigurations)
{
profileConfiguration.Save();
Entity.ProfileConfigurations.Add(profileConfiguration.Entity);
}
}
#endregion