mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
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:
@@ -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() { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user