diff --git a/assets/brand/system.png b/assets/brand/system.png new file mode 100644 index 00000000..04dbb35f Binary files /dev/null and b/assets/brand/system.png differ diff --git a/crates/coop/src/chatspace.rs b/crates/coop/src/chatspace.rs index f4140adc..60f980b9 100644 --- a/crates/coop/src/chatspace.rs +++ b/crates/coop/src/chatspace.rs @@ -436,11 +436,6 @@ impl ChatSpace { } else { css.signal.send(SignalKind::RelaysNotFound).await; } - } else { - for (id, relays) in client.subscriptions().await { - log::info!("sub id: {id:?}"); - log::info!("relays: {relays:?}"); - } } } Kind::ContactList => { diff --git a/crates/coop/src/views/chat/mod.rs b/crates/coop/src/views/chat/mod.rs index 8fed6c89..24f3bd3b 100644 --- a/crates/coop/src/views/chat/mod.rs +++ b/crates/coop/src/views/chat/mod.rs @@ -395,13 +395,15 @@ impl Chat { cx.spawn_in(window, async move |this, cx| { match task.await { Ok(reports) => { - this.update(cx, |this, cx| { - this.reports_by_id.entry(id_clone).and_modify(|this| { - *this = reports; - }); - cx.notify(); - }) - .ok(); + if !reports.is_empty() { + this.update(cx, |this, cx| { + this.reports_by_id.entry(id_clone).and_modify(|this| { + *this = reports; + }); + cx.notify(); + }) + .ok(); + } } Err(e) => { cx.update(|window, cx| { @@ -643,17 +645,28 @@ impl Chat { fn render_warning(&mut self, ix: usize, content: String, cx: &mut Context) -> AnyElement { div() .id(ix) + .relative() .w_full() .py_1() .px_3() + .bg(cx.theme().warning_background) .child( h_flex() .gap_3() .text_sm() .text_color(cx.theme().warning_foreground) - .child(Avatar::new("brand/avatar.png").size(rems(2.))) + .child(Avatar::new("brand/system.png").size(rems(2.))) .child(SharedString::from(content)), ) + .child( + div() + .absolute() + .left_0() + .top_0() + .w(px(2.)) + .h_full() + .bg(cx.theme().warning_active), + ) .into_any_element() } @@ -704,7 +717,8 @@ impl Chat { .py_1() .px_3() .child( - h_flex() + div() + .flex() .gap_3() .when(!hide_avatar, |this| { this.child(Avatar::new(author.avatar_url(proxy)).size(rems(2.)))