chore: Fix several style lints (#17488)
It's not comprehensive enough to start linting on `style` group, but hey, it's a start. Release Notes: - N/A
This commit is contained in:
parent
93249fc82b
commit
e6c1c51b37
361 changed files with 3530 additions and 3587 deletions
|
@ -560,7 +560,7 @@ impl ChatPanel {
|
|||
},
|
||||
)
|
||||
.child(
|
||||
self.render_popover_buttons(&cx, message_id, can_delete_message, can_edit_message)
|
||||
self.render_popover_buttons(cx, message_id, can_delete_message, can_edit_message)
|
||||
.mt_neg_2p5(),
|
||||
)
|
||||
}
|
||||
|
@ -705,7 +705,7 @@ impl ChatPanel {
|
|||
menu.entry(
|
||||
"Copy message text",
|
||||
None,
|
||||
cx.handler_for(&this, move |this, cx| {
|
||||
cx.handler_for(this, move |this, cx| {
|
||||
if let Some(message) = this.active_chat().and_then(|active_chat| {
|
||||
active_chat.read(cx).find_loaded_message(message_id)
|
||||
}) {
|
||||
|
@ -718,7 +718,7 @@ impl ChatPanel {
|
|||
menu.entry(
|
||||
"Delete message",
|
||||
None,
|
||||
cx.handler_for(&this, move |this, cx| this.remove_message(message_id, cx)),
|
||||
cx.handler_for(this, move |this, cx| this.remove_message(message_id, cx)),
|
||||
)
|
||||
})
|
||||
})
|
||||
|
@ -802,13 +802,11 @@ impl ChatPanel {
|
|||
{
|
||||
task.detach();
|
||||
}
|
||||
} else {
|
||||
if let Some(task) = chat
|
||||
.update(cx, |chat, cx| chat.send_message(message, cx))
|
||||
.log_err()
|
||||
{
|
||||
task.detach();
|
||||
}
|
||||
} else if let Some(task) = chat
|
||||
.update(cx, |chat, cx| chat.send_message(message, cx))
|
||||
.log_err()
|
||||
{
|
||||
task.detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -854,7 +852,7 @@ impl ChatPanel {
|
|||
let scroll_to_message_id = this.update(&mut cx, |this, cx| {
|
||||
this.set_active_chat(chat.clone(), cx);
|
||||
|
||||
scroll_to_message_id.or_else(|| this.last_acknowledged_message_id)
|
||||
scroll_to_message_id.or(this.last_acknowledged_message_id)
|
||||
})?;
|
||||
|
||||
if let Some(message_id) = scroll_to_message_id {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue