authorclover caruso <git@paperclover.net> 2026-10-12 11:19:53-07:00
committerclover caruso <git@paperclover.net> 2026-10-15 01:52:38-07:00
loga8bb5062f1a874d388e00a07857a053ae0961320
treea9e5575515054c04403925a33d8b192158544046
parente6b4db129454883fc60de622c8a1f492c78cc7aa
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU (~clover)

fix(ios): release welcome name observers with their prompt

Use the text field editing action with weak field and Continue-action captures instead of a process-retained notification subscription. Refs #75 Assisted-by: gpt-6.1-sol

1 files changed, 4 insertions(+), 3 deletions(-)

apps/ios/Snowbound/Prototypes.swift+4-3
...@@ -63,9 +63,10 @@ extension Prototype {...@@ -63,9 +63,10 @@ extension Prototype {
63 field.placeholder = "Name"63 field.placeholder = "Name"
64 field.textContentType = .name64 field.textContentType = .name
65 field.autocapitalizationType = .words65 field.autocapitalizationType = .words
66 NotificationCenter.default.addObserver(66 field.addAction(
67 forName: UITextField.textDidChangeNotification, object: field, queue: .main67 UIAction { [weak field, weak save] _ in
68 ) { _ in save.isEnabled = !(field.text ?? "").trimmingCharacters(in: .whitespaces).isEmpty }68 save?.isEnabled = !(field?.text ?? "").trimmingCharacters(in: .whitespaces).isEmpty
69 }, for: .editingChanged)
69 }70 }
70 alert.addAction(UIAlertAction(title: "Not Now", style: .cancel))71 alert.addAction(UIAlertAction(title: "Not Now", style: .cancel))
71 alert.addAction(save)72 alert.addAction(save)