Fix editor crashing when entering whitespace
This commit is contained in:
parent
26d953395b
commit
e6e6bcaf31
1 changed files with 5 additions and 1 deletions
|
|
@ -45,6 +45,10 @@ fn styled_content_me(content: &str) -> Styled {
|
||||||
Styled::new(content.trim(), style).then("*", style)
|
Styled::new(content.trim(), style).then("*", style)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn styled_editor_content(content: &str) -> Styled {
|
||||||
|
Styled::new_plain(content)
|
||||||
|
}
|
||||||
|
|
||||||
impl Msg for SmallMessage {
|
impl Msg for SmallMessage {
|
||||||
type Id = Snowflake;
|
type Id = Snowflake;
|
||||||
|
|
||||||
|
|
@ -71,7 +75,7 @@ impl ChatMsg for SmallMessage {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn edit(nick: &str, content: &str) -> (Styled, Styled) {
|
fn edit(nick: &str, content: &str) -> (Styled, Styled) {
|
||||||
(styled_nick(nick), styled_content(content))
|
(styled_nick(nick), styled_editor_content(content))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pseudo(nick: &str, content: &str) -> (Styled, Styled) {
|
fn pseudo(nick: &str, content: &str) -> (Styled, Styled) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue