Removing dead code part 3 (#2264)

This commit is contained in:
Mauro
2023-12-19 12:12:16 +01:00
committed by GitHub
parent 334d55aeaf
commit 09fb5461e6
77 changed files with 48 additions and 462 deletions
@@ -41,6 +41,7 @@ final class SettingsScreenCoordinator: CoordinatorProtocol {
private let parameters: SettingsScreenCoordinatorParameters
private var viewModel: SettingsScreenViewModelProtocol
// periphery:ignore - retaining purpose
private var appLockSetupFlowCoordinator: AppLockSetupFlowCoordinator?
private let actionsSubject: PassthroughSubject<SettingsScreenCoordinatorAction, Never> = .init()
@@ -20,9 +20,6 @@ import SwiftUI
typealias SettingsScreenViewModelType = StateStoreViewModel<SettingsScreenViewState, SettingsScreenViewAction>
class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewModelProtocol {
private let userSession: UserSessionProtocol
private let appSettings: AppSettings
private var actionsSubject: PassthroughSubject<SettingsScreenViewModelAction, Never> = .init()
var actions: AnyPublisher<SettingsScreenViewModelAction, Never> {
@@ -30,9 +27,6 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
}
init(userSession: UserSessionProtocol, appSettings: AppSettings) {
self.userSession = userSession
self.appSettings = appSettings
super.init(initialViewState: .init(deviceID: userSession.deviceID,
userID: userSession.userID,
accountProfileURL: userSession.clientProxy.accountURL(action: .profile),
@@ -24,18 +24,11 @@ struct UserDetailsEditScreenCoordinatorParameters {
let userIndicatorController: UserIndicatorControllerProtocol
}
enum UserDetailsEditScreenCoordinatorAction { }
final class UserDetailsEditScreenCoordinator: CoordinatorProtocol {
private let parameters: UserDetailsEditScreenCoordinatorParameters
private var viewModel: UserDetailsEditScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<UserDetailsEditScreenCoordinatorAction, Never> = .init()
private var cancellables = Set<AnyCancellable>()
var actions: AnyPublisher<UserDetailsEditScreenCoordinatorAction, Never> {
actionsSubject.eraseToAnyPublisher()
}
init(parameters: UserDetailsEditScreenCoordinatorParameters) {
self.parameters = parameters
@@ -37,12 +37,7 @@ struct UserDetailsEditScreenViewState: BindableState {
var nameDidChange: Bool {
bindings.name != currentDisplayName
}
/// The string shown for the room's name when it can't be edited.
var nameRowTitle: String {
bindings.name.isEmpty ? L10n.screenEditProfileDisplayName : bindings.name
}
var avatarDidChange: Bool {
localMedia != nil || selectedAvatarURL != currentAvatarURL
}