about summary refs log tree commit diff
path: root/MatrixUtils.Web/Pages/Rooms/PolicyListComponents
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-09 23:42:07 +0100
committerRory& <root@rory.gay>2025-12-09 23:42:07 +0100
commit6769b0fd6f37cbc27646fa0ca8e458489c935039 (patch)
tree3acc618064bda1ada456eb1b98a90dba0abdffbd /MatrixUtils.Web/Pages/Rooms/PolicyListComponents
parentdotnet 10, synapse admin room list improvements (diff)
downloadMatrixUtils-6769b0fd6f37cbc27646fa0ca8e458489c935039.tar.xz
Commit various changes that never made it into git
Diffstat (limited to 'MatrixUtils.Web/Pages/Rooms/PolicyListComponents')
-rw-r--r--MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListEditorHeader.razor4
-rw-r--r--MatrixUtils.Web/Pages/Rooms/PolicyListComponents/PolicyListRowComponent.razor12
2 files changed, 8 insertions, 8 deletions
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();