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