.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user