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/PolicyListEditorHeader.razor | 4 ++-- .../Rooms/PolicyListComponents/PolicyListRowComponent.razor | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'MatrixUtils.Web/Pages/Rooms/PolicyListComponents') diff --git a/MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListEditorHeader.razor b/MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListEditorHeader.razor index 8585561..b57beae 100644 --- a/MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListEditorHeader.razor +++ b/MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListEditorHeader.razor @@ -55,7 +55,7 @@ private string? RoomAlias { get; set; } private string? DraupnirShortcode { get; set; } - private StateEventResponse? CurrentlyEditingEvent { + private MatrixEventResponse? CurrentlyEditingEvent { get; set { field = value; @@ -81,7 +81,7 @@ StateHasChanged(); } - private async Task UpdatePolicyAsync(StateEventResponse evt) { + private async Task UpdatePolicyAsync(MatrixEventResponse evt) { Console.WriteLine("UpdatePolicyAsync in PolicyListEditorHeader not yet implemented!"); } 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