This commit is contained in:
2026-06-05 12:16:13 +07:00
parent a0d76e2cf4
commit d53e9d538c
5 changed files with 101 additions and 179 deletions

View File

@@ -13,13 +13,13 @@ use nostr_sdk::prelude::*;
mod blossom;
mod constants;
mod device;
mod nip05;
mod nip4e;
mod signer;
pub use blossom::*;
pub use constants::*;
pub use device::*;
pub use nip4e::*;
pub use nip05::*;
pub use signer::*;
@@ -149,11 +149,12 @@ impl NostrRegistry {
// Run at the end of current cycle
cx.defer_in(window, |this, _window, cx| {
this.connect(cx);
// Create an identity if none exists
if this.npubs.read(cx).is_empty() {
// Create an identity if none exists
this.create_identity(cx);
} else {
// Show the identity dialog
// Show the account selector dialog
cx.emit(StateEvent::Show);
}
});
@@ -234,10 +235,7 @@ impl NostrRegistry {
}
// Connect to all added relays
client
.connect()
.and_wait(Duration::from_secs(TIMEOUT))
.await;
client.connect().await;
Ok(())
});