.
This commit is contained in:
@@ -130,6 +130,7 @@ impl NostrRegistry {
|
||||
// Connect to bootstrap relays after the window is ready
|
||||
cx.defer_in(window, |this, _window, cx| {
|
||||
this.connect_bootstrap_relays(cx);
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
this.get_user_credential(cx);
|
||||
});
|
||||
|
||||
|
||||
@@ -214,6 +214,8 @@ impl Dock {
|
||||
pub fn set_open(&mut self, open: bool, window: &mut Window, cx: &mut Context<Self>) {
|
||||
self.open = open;
|
||||
let item = self.panel.clone();
|
||||
// Use defer_in (not window.defer) so the callback is cancelled
|
||||
// if this Dock entity is dropped before the deferred frame runs.
|
||||
cx.defer_in(window, move |_, window, cx| {
|
||||
item.set_collapsed(!open, window, cx);
|
||||
});
|
||||
|
||||
@@ -55,7 +55,7 @@ impl Screening {
|
||||
window.close_all_modals(cx);
|
||||
}));
|
||||
|
||||
cx.defer_in(window, move |this, _window, cx| {
|
||||
cx.defer_in(window, |this, _window, cx| {
|
||||
this.check_contact(cx);
|
||||
this.check_wot(cx);
|
||||
this.check_last_activity(cx);
|
||||
|
||||
Reference in New Issue
Block a user