update components

This commit is contained in:
2026-02-19 08:17:46 +07:00
parent 2c33670ba5
commit 3e8efdd0ef
31 changed files with 3240 additions and 2440 deletions

View File

@@ -82,10 +82,20 @@ impl ChatRegistry {
/// Create a new chat registry instance
fn new(window: &mut Window, cx: &mut Context<Self>) -> Self {
let nostr = NostrRegistry::global(cx);
let nip65 = nostr.read(cx).nip65_state();
let nip17 = nostr.read(cx).nip17_state();
let mut subscriptions = smallvec![];
subscriptions.push(
// Observe the nip65 state and load chat rooms on every state change
cx.observe(&nip65, |this, state, cx| {
if state.read(cx).idle() {
this.reset(cx);
}
}),
);
subscriptions.push(
// Observe the nip17 state and load chat rooms on every state change
cx.observe(&nip17, |this, _state, cx| {

View File

@@ -53,7 +53,7 @@ impl SendReport {
/// Returns true if the send was successful.
pub fn success(&self) -> bool {
if let Some(output) = self.output.as_ref() {
!output.success.is_empty()
!output.failed.is_empty()
} else {
false
}