This commit is contained in:
Ren Amamiya
2026-04-02 17:12:55 +07:00
parent 216c877ebf
commit d1f0373916
5 changed files with 34 additions and 433 deletions

View File

@@ -128,22 +128,17 @@ impl ChatRegistry {
subscriptions.push(
// Subscribe to the signer event
cx.subscribe(&nostr, |this, _state, event, cx| {
match event {
StateEvent::SignerSet => {
this.reset(cx);
this.get_rooms(cx);
}
StateEvent::RelayConnected => {
this.get_contact_list(cx);
this.get_messages(cx)
}
_ => {}
if event == &StateEvent::SignerSet {
this.reset(cx);
this.get_rooms(cx);
};
}),
);
// Run at the end of the current cycle
cx.defer_in(window, |this, _window, cx| {
this.get_contact_list(cx);
this.get_messages(cx);
this.get_rooms(cx);
this.handle_notifications(cx);
this.tracking(cx);