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 --- .../TimelineHistoryVisibilityItem.razor | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.razor (limited to 'MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.razor') diff --git a/MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.razor b/MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.razor new file mode 100644 index 0000000..172a38c --- /dev/null +++ b/MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.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 history visibility to "@currentEventContent.HistoryVisibility" + } + else { + changed the history visibility from "@previousEventContent.HistoryVisibility" to "@currentEventContent.HistoryVisibility" + } +} +else { +
+ Unknown event @Event.Type (@Event.StateKey) +
+            @Event.ToJson()
+        
+
+} + +@code { + private RoomHistoryVisibilityEventContent? previousEventContent => PreviousState?.TypedContent as RoomHistoryVisibilityEventContent; + + private RoomHistoryVisibilityEventContent? currentEventContent => Event.TypedContent as RoomHistoryVisibilityEventContent; +} \ No newline at end of file -- cgit 1.4.1