This commit is contained in:
2026-07-27 15:02:50 +07:00
parent b349656c56
commit 2ff83079b8
9 changed files with 167 additions and 181 deletions

View File

@@ -92,7 +92,6 @@ impl DeviceRegistry {
fn new(window: &mut Window, cx: &mut Context<Self>) -> Self {
let nostr = NostrRegistry::global(cx);
let settings = AppSettings::global(cx);
let nip4e_enabled = settings.read(cx).is_nip4e_enabled(cx);
let signer = cx.new(|_| None);
let mut subscriptions = smallvec![];
@@ -109,7 +108,7 @@ impl DeviceRegistry {
subscriptions.push(
// Observe the user signer
cx.subscribe(&nostr, move |this, _nostr, event, cx| {
if event.signer_changed() && nip4e_enabled {
if event.signer_changed() && settings.read(cx).is_nip4e_enabled(cx) {
this.get_announcement(cx);
}
}),