Re-organise SettingsScreen to have distinct Account/App settings. (#6288)

* Re-organise SettingsScreen to have distinct Account/App settings.

* Remove the AdvancedSettingsScreen.
This commit is contained in:
Doug
2026-10-07 16:51:28 +01:00
committed by GitHub
parent dafda65cbe
commit 3b40aadc98
27 changed files with 321 additions and 687 deletions
@@ -13,12 +13,34 @@ struct ModerationAndSafetySettingsScreenCoordinatorParameters {
let userIndicatorController: UserIndicatorControllerProtocol
}
enum ModerationAndSafetySettingsScreenCoordinatorAction {
case blockedUsers
}
final class ModerationAndSafetySettingsScreenCoordinator: CoordinatorProtocol {
private var viewModel: ModerationAndSafetySettingsScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<ModerationAndSafetySettingsScreenCoordinatorAction, Never> = .init()
var actionsPublisher: AnyPublisher<ModerationAndSafetySettingsScreenCoordinatorAction, Never> {
actionsSubject.eraseToAnyPublisher()
}
private var cancellables = Set<AnyCancellable>()
init(parameters: ModerationAndSafetySettingsScreenCoordinatorParameters) {
viewModel = ModerationAndSafetySettingsScreenViewModel(userSession: parameters.userSession,
userIndicatorController: parameters.userIndicatorController)
viewModel.actionsPublisher
.sink { [weak self] action in
guard let self else { return }
switch action {
case .blockedUsers:
actionsSubject.send(.blockedUsers)
}
}
.store(in: &cancellables)
}
func toPresentable() -> AnyView {