From 087391c7ea413cc9e72f26af9392ee9faf36e06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 8 Nov 2022 21:28:21 +0100 Subject: [PATCH] room-history: Fix random offset for state-like events --- src/session/content/room_history/item_row.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/session/content/room_history/item_row.rs b/src/session/content/room_history/item_row.rs index 0fd997ae..66fae7f5 100644 --- a/src/session/content/room_history/item_row.rs +++ b/src/session/content/room_history/item_row.rs @@ -196,6 +196,13 @@ impl ItemRow { fn set_item(&self, item: Option) { let imp = self.imp(); + // Reinitialize the header. + if let Some(list_item) = self.parent() { + if list_item.has_css_class("has-header") { + list_item.remove_css_class("has-header"); + } + } + if let Some(event) = imp .item .borrow()