mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 04:18:31 +00:00
refactor(healthchat): move the session hooks onto UserHooks
This commit is contained in:
@@ -8,16 +8,12 @@
|
||||
import SwiftUI
|
||||
|
||||
nonisolated protocol ExtendedProfileSectionHookProtocol: Sendable {
|
||||
@MainActor func configure(with userSession: UserSessionProtocol?) async
|
||||
|
||||
/// An extra Form section rendered below the header on the user profile
|
||||
/// and room member details screens.
|
||||
@MainActor func extendedProfileSection(userID: String) -> AnyView?
|
||||
}
|
||||
|
||||
struct DefaultExtendedProfileSectionHook: ExtendedProfileSectionHookProtocol {
|
||||
func configure(with userSession: UserSessionProtocol?) async { }
|
||||
|
||||
func extendedProfileSection(userID: String) -> AnyView? {
|
||||
nil
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
import SwiftUI
|
||||
|
||||
nonisolated protocol SettingsScreenHookProtocol: Sendable {
|
||||
@MainActor func configure(with userSession: UserSessionProtocol?) async
|
||||
|
||||
/// An extra Form section rendered between the user and the account sections,
|
||||
/// advertising whatever is holding the account back.
|
||||
/// - Parameter completeProfileAction: Opens the own profile editor.
|
||||
@@ -20,8 +18,6 @@ nonisolated protocol SettingsScreenHookProtocol: Sendable {
|
||||
}
|
||||
|
||||
struct DefaultSettingsScreenHook: SettingsScreenHookProtocol {
|
||||
func configure(with userSession: UserSessionProtocol?) async { }
|
||||
|
||||
func accountStatusSection(completeProfileAction: @escaping () -> Void) -> AnyView? {
|
||||
nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user