From b453a0204e30153d65c2f505e0058eee39cd5d68 Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 1 Aug 2024 12:54:06 +0100 Subject: [PATCH] sdk-ui: Make the SentInClear shield red. --- crates/matrix-sdk-ui/src/timeline/event_item/mod.rs | 2 +- crates/matrix-sdk-ui/src/timeline/tests/shields.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs b/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs index 28bb384a80d..7a024398bc0 100644 --- a/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs +++ b/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs @@ -382,7 +382,7 @@ impl EventTimelineItem { Some(info.verification_state.to_shield_state_lax()) } } - None => Some(ShieldState::Grey { + None => Some(ShieldState::Red { code: ShieldStateCode::SentInClear, message: SENT_IN_CLEAR, }), diff --git a/crates/matrix-sdk-ui/src/timeline/tests/shields.rs b/crates/matrix-sdk-ui/src/timeline/tests/shields.rs index 2d7b5afdf13..95e939a7b83 100644 --- a/crates/matrix-sdk-ui/src/timeline/tests/shields.rs +++ b/crates/matrix-sdk-ui/src/timeline/tests/shields.rs @@ -43,7 +43,7 @@ async fn test_sent_in_clear_shield() { let shield = item.as_event().unwrap().get_shield(false); assert_eq!( shield, - Some(ShieldState::Grey { code: ShieldStateCode::SentInClear, message: "Sent in clear." }) + Some(ShieldState::Red { code: ShieldStateCode::SentInClear, message: "Sent in clear." }) ); } @@ -116,6 +116,6 @@ async fn test_local_sent_in_clear_shield() { let shield = event_item.get_shield(false); assert_eq!( shield, - Some(ShieldState::Grey { code: ShieldStateCode::SentInClear, message: "Sent in clear." }) + Some(ShieldState::Red { code: ShieldStateCode::SentInClear, message: "Sent in clear." }) ); }