room-history: Dont overwrite message row parent's CSS classes

This commit is contained in:
Kévin Commaille 2022-08-20 19:02:28 +02:00
parent e35c2b4464
commit 852dd05462
No known key found for this signature in database
GPG key ID: DD507DAE96E8245C

View file

@ -138,9 +138,9 @@ impl MessageRow {
priv_.header.set_visible(visible);
if let Some(list_item) = self.parent().and_then(|w| w.parent()) {
if visible {
list_item.set_css_classes(&["has-header"]);
} else {
if visible && !list_item.has_css_class("has-header") {
list_item.add_css_class("has-header");
} else if !visible && list_item.has_css_class("has-header") {
list_item.remove_css_class("has-header");
}
}