update ui
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
use instant::Duration;
|
||||
|
||||
use anyhow::{Error, anyhow};
|
||||
use common::config_dir;
|
||||
use gpui::{App, AppContext, Context, Entity, EventEmitter, Global, Task, Window};
|
||||
use instant::Duration;
|
||||
use nostr_connect::prelude::*;
|
||||
use nostr_gossip_memory::prelude::*;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
@@ -130,8 +130,12 @@ 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);
|
||||
|
||||
if cfg!(target_arch = "wasm32") {
|
||||
cx.emit(StateEvent::NoSigner);
|
||||
} else {
|
||||
this.get_user_credential(cx);
|
||||
}
|
||||
});
|
||||
|
||||
Self {
|
||||
@@ -222,7 +226,6 @@ impl NostrRegistry {
|
||||
}
|
||||
|
||||
/// Check the user's credential and set the signer if valid
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn get_user_credential(&mut self, cx: &mut Context<Self>) {
|
||||
let user_keyring = cx.read_credentials(USER_KEYRING);
|
||||
let master_keyring = self.get_master_key(cx);
|
||||
|
||||
Reference in New Issue
Block a user