diff options
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 08dd833..492a387 100644 --- a/src/main.rs +++ b/src/main.rs @@ -988,6 +988,7 @@ fn chat_list_item<'a>( ) -> Element<'a, Message> { let mut content: Column<Message> = column![text(chat.correspondent.to_string())]; if let Some(latest_message) = latest_message { + let message = latest_message.body.body.replace("\n", " "); let date = latest_message.timestamp.naive_local(); let now = Local::now().naive_local(); let timeinfo; @@ -999,7 +1000,7 @@ fn chat_list_item<'a>( } content = content.push( row![ - container(text(latest_message.body.body.clone()).wrapping(Wrapping::None)) + container(text(message).wrapping(Wrapping::None)) .clip(true) .width(Fill), timeinfo |