fix(healthchat): refresh the account status whenever settings appears

The banner kept telling the user to complete a profile they had just
completed, and nothing was fetched until the screen was actually shown.
This commit is contained in:
Sedat Qaja
2026-10-12 11:40:42 +02:00
parent d9524130fa
commit 1edfb8057f
6 changed files with 71 additions and 9 deletions
@@ -14,6 +14,9 @@ nonisolated protocol SettingsScreenHookProtocol: Sendable {
/// advertising whatever is holding the account back.
/// - Parameter completeProfileAction: Opens the own profile editor.
@MainActor func accountStatusSection(completeProfileAction: @escaping () -> Void) -> AnyView?
/// Called whenever the settings screen appears, so the section reflects what the user just did.
@MainActor func refreshAccountStatus()
}
struct DefaultSettingsScreenHook: SettingsScreenHookProtocol {
@@ -22,4 +25,6 @@ struct DefaultSettingsScreenHook: SettingsScreenHookProtocol {
func accountStatusSection(completeProfileAction: @escaping () -> Void) -> AnyView? {
nil
}
func refreshAccountStatus() { }
}