wip: refactor

This commit is contained in:
2024-12-13 10:11:12 +07:00
parent 10f042acab
commit f82eaa4ac3
20 changed files with 431 additions and 231 deletions

View File

@@ -7,7 +7,7 @@ use gpui::*;
use keyring::Entry;
use nostr_sdk::prelude::*;
use crate::{constants::KEYRING_SERVICE, get_client, states::account::AccountState};
use crate::{constants::KEYRING_SERVICE, get_client, states::account::AccountRegistry};
pub struct Onboarding {
input: View<TextInput>,
@@ -50,8 +50,8 @@ impl Onboarding {
});
// Update view
cx.update_global(|state: &mut AccountState, cx| {
state.in_use = Some(public_key);
cx.update_global(|state: &mut AccountRegistry, cx| {
state.set_user(Some(public_key));
cx.notify();
});