Hide the chat message editor when there is no active chat (#7441)
This PR makes it so the chat message editor is hidden when not in an active chat. Release Notes: - Changed the chat message editor to be hidden when not in an active chat.
This commit is contained in:
parent
b2ce515593
commit
56f7f18033
1 changed files with 22 additions and 19 deletions
|
@ -589,25 +589,28 @@ impl Render for ChatPanel {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.child(
|
.children(
|
||||||
h_flex()
|
Some(
|
||||||
.when(!self.is_scrolled_to_bottom, |el| {
|
h_flex()
|
||||||
el.border_t_1().border_color(cx.theme().colors().border)
|
.when(!self.is_scrolled_to_bottom, |el| {
|
||||||
})
|
el.border_t_1().border_color(cx.theme().colors().border)
|
||||||
.p_2()
|
})
|
||||||
.map(|el| {
|
.p_2()
|
||||||
if self.active_chat.is_some() {
|
.map(|el| {
|
||||||
el.child(self.message_editor.clone())
|
if self.active_chat.is_some() {
|
||||||
} else {
|
el.child(self.message_editor.clone())
|
||||||
el.child(
|
} else {
|
||||||
div()
|
el.child(
|
||||||
.rounded_md()
|
div()
|
||||||
.h_6()
|
.rounded_md()
|
||||||
.w_full()
|
.h_6()
|
||||||
.bg(cx.theme().colors().editor_background),
|
.w_full()
|
||||||
)
|
.bg(cx.theme().colors().editor_background),
|
||||||
}
|
)
|
||||||
}),
|
}
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.filter(|_| self.active_chat.is_some()),
|
||||||
)
|
)
|
||||||
.into_any()
|
.into_any()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue