Skip to content

Commit

Permalink
Storage - Fix profile order not loading/saving
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBeekman committed Mar 15, 2024
1 parent 8d7af6b commit 4c2eca2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Artemis.Core/Models/Profile/ProfileCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void Load()
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 />
Expand All @@ -180,7 +180,10 @@ public void Save()

Entity.ProfileConfigurations.Clear();
foreach (ProfileConfiguration profileConfiguration in ProfileConfigurations)
{
profileConfiguration.Save();
Entity.ProfileConfigurations.Add(profileConfiguration.Entity);
}
}

#endregion
Expand Down

0 comments on commit 4c2eca2

Please sign in to comment.