chore: update deps

This commit is contained in:
2025-08-08 13:14:11 +07:00
parent 8fca202c05
commit be660cb14b
4 changed files with 72 additions and 69 deletions

View File

@@ -140,15 +140,7 @@ impl Chat {
// Initialize list state
// [item_count] always equal to 1 at the beginning
let list_state = ListState::new(1, ListAlignment::Bottom, px(1024.), {
let this = cx.entity().downgrade();
move |ix, window, cx| {
this.update(cx, |this, cx| {
this.render_message(ix, window, cx).into_any_element()
})
.unwrap_or(Empty.into_any())
}
});
let list_state = ListState::new(1, ListAlignment::Bottom, px(1024.));
Self {
id: room.read(cx).id.to_string().into(),
@@ -872,10 +864,19 @@ impl Focusable for Chat {
impl Render for Chat {
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let entity = cx.entity();
v_flex()
.image_cache(self.image_cache.clone())
.size_full()
.child(list(self.list_state.clone()).flex_1())
.child(
list(self.list_state.clone(), move |ix, window, cx| {
entity.update(cx, |this, cx| {
this.render_message(ix, window, cx).into_any_element()
})
})
.flex_1(),
)
.child(
div()
.flex_shrink_0()

View File

@@ -118,14 +118,14 @@ impl Render for TitleBar {
.w_full()
.when(cx.theme().platform_kind.is_mac(), |this| {
this.on_click(|event, window, _| {
if event.up.click_count == 2 {
if event.click_count() == 2 {
window.titlebar_double_click();
}
})
})
.when(cx.theme().platform_kind.is_linux(), |this| {
this.on_click(|event, window, _| {
if event.up.click_count == 2 {
if event.click_count() == 2 {
window.zoom_window();
}
})

View File

@@ -10,7 +10,7 @@ pub trait InteractiveElementExt: InteractiveElement {
Self: Sized,
{
self.interactivity().on_click(move |event, window, cx| {
if event.up.click_count == 2 {
if event.click_count() == 2 {
listener(event, window, cx);
}
});