From 03313562d21d5db9bf6a14ebbeab80e06c883d3a Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 24 Jan 2024 02:31:56 +0100 Subject: MRU->RMU, fixes, cleanup --- .../TimelineCanonicalAliasItem.razor | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor (limited to 'MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor') diff --git a/MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor b/MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor new file mode 100644 index 0000000..1213432 --- /dev/null +++ b/MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor @@ -0,0 +1,27 @@ +@using ArcaneLibs.Extensions +@using LibMatrix.EventTypes.Spec.State +@using LibMatrix.Responses +@inherits BaseTimelineItem + +@if (currentEventContent is not null) { + @if (previousEventContent is null) { + set the room alias to "@currentEventContent.Alias" + } + else { + changed the room name from "@previousEventContent.Alias" to "@currentEventContent.Alias" + } +} +else { +
+ Unknown event @Event.Type (@Event.StateKey) +
+            @Event.ToJson()
+        
+
+} + +@code { + private RoomCanonicalAliasEventContent? previousEventContent => PreviousState?.TypedContent as RoomCanonicalAliasEventContent; + + private RoomCanonicalAliasEventContent? currentEventContent => Event.TypedContent as RoomCanonicalAliasEventContent; +} \ No newline at end of file -- cgit 1.4.1