From 6769b0fd6f37cbc27646fa0ca8e458489c935039 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 9 Dec 2025 23:42:07 +0100 Subject: Commit various changes that never made it into git --- .../Rooms/PolicyListComponents/PolicyListRowComponent.razor | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListRowComponent.razor') diff --git a/MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListRowComponent.razor b/MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListRowComponent.razor index cd432c9..3ded78f 100644 --- a/MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListRowComponent.razor +++ b/MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListRowComponent.razor @@ -99,7 +99,7 @@ [Parameter] public required Action PolicyCollectionStateHasChanged { get; set; } - private StateEventResponse Policy => PolicyInfo.Policy; + private MatrixEventResponse Policy => PolicyInfo.Policy; private bool IsEditing { get; @@ -152,8 +152,8 @@ if (PolicyInfo.DuplicatedBy.Count > 0) { foreach (var evt in PolicyInfo.DuplicatedBy) { var matchingEntry = PolicyCollection.ActivePolicies - .FirstOrDefault(x => StateEvent.Equals(x.Value.Policy, evt)).Value; - var removals = matchingEntry.DuplicatedBy.RemoveAll(x => StateEvent.Equals(x, Policy)); + .FirstOrDefault(x => MatrixEvent.Equals(x.Value.Policy, evt)).Value; + var removals = matchingEntry.DuplicatedBy.RemoveAll(x => MatrixEvent.Equals(x, Policy)); Console.WriteLine($"Removed {removals} duplicates from {evt.EventId}, matching entry: {matchingEntry.ToJson()}"); if (PolicyCollection.ViewType == PolicyList.PolicyCollection.SpecialViewType.Duplicates && matchingEntry.DuplicatedBy.Count == 0) { PolicyCollection.ActivePolicies.Remove((matchingEntry.Policy.Type, matchingEntry.Policy.StateKey)); @@ -169,8 +169,8 @@ if (PolicyInfo.MadeRedundantBy.Count > 0) { foreach (var evt in PolicyInfo.MadeRedundantBy) { var matchingEntry = PolicyCollection.ActivePolicies - .FirstOrDefault(x => StateEvent.Equals(x.Value.Policy, evt)).Value; - var removals = matchingEntry.MadeRedundantBy.RemoveAll(x => StateEvent.Equals(x, Policy)); + .FirstOrDefault(x => MatrixEvent.Equals(x.Value.Policy, evt)).Value; + var removals = matchingEntry.MadeRedundantBy.RemoveAll(x => MatrixEvent.Equals(x, Policy)); Console.WriteLine($"Removed {removals} redundants from {evt.EventId}, matching entry: {matchingEntry.ToJson()}"); } @@ -186,7 +186,7 @@ // await LoadStatesAsync(); } - private async Task UpdatePolicyAsync(StateEventResponse evt) { + private async Task UpdatePolicyAsync(MatrixEventResponse evt) { await Room.SendStateEventAsync(Policy.Type, Policy.StateKey, Policy.RawContent); // CurrentlyEditingEvent = null; // await LoadStatesAsync(); -- cgit 1.5.1