Periphery cleanup (#5893)

This commit is contained in:
Mauro
2026-07-20 11:16:11 +02:00
committed by GitHub
parent 175aca596e
commit 9093631f8b
275 changed files with 381 additions and 2268 deletions
@@ -34,7 +34,6 @@ struct AdvancedSettingsScreenViewState: BindableState {
var bindings: AdvancedSettingsScreenViewStateBindings
}
// periphery:ignore - subscript are seen as false positives
@dynamicMemberLookup
struct AdvancedSettingsScreenViewStateBindings {
private let advancedSettings: AdvancedSettingsProtocol
@@ -19,7 +19,6 @@ enum DeactivateAccountScreenCoordinatorAction {
}
final class DeactivateAccountScreenCoordinator: CoordinatorProtocol {
private let parameters: DeactivateAccountScreenCoordinatorParameters
private let viewModel: DeactivateAccountScreenViewModelProtocol
private var cancellables = Set<AnyCancellable>()
@@ -30,8 +29,6 @@ final class DeactivateAccountScreenCoordinator: CoordinatorProtocol {
}
init(parameters: DeactivateAccountScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = DeactivateAccountScreenViewModel(clientProxy: parameters.clientProxy,
userIndicatorController: parameters.userIndicatorController)
}
@@ -25,7 +25,6 @@ final class DeveloperOptionsScreenCoordinator: CoordinatorProtocol {
init(appSettings: AppSettings, appHooks: AppHooks, clientProxy: ClientProxyProtocol?) {
viewModel = DeveloperOptionsScreenViewModel(developerOptions: appSettings,
elementCallBaseURL: appSettings.elementCallBaseURL,
appHooks: appHooks,
clientProxy: clientProxy)
@@ -13,7 +13,6 @@ enum DeveloperOptionsScreenViewModelAction {
}
struct DeveloperOptionsScreenViewState: BindableState {
let elementCallBaseURL: URL
let appHooks: AppHooks
var storeSizes: [StoreSize]?
let shouldShowClearCache: Bool
@@ -31,7 +30,6 @@ struct DeveloperOptionsScreenViewState: BindableState {
}
}
// periphery: ignore - subscripts are seen as false positive
@dynamicMemberLookup
struct DeveloperOptionsScreenViewStateBindings {
private let developerOptions: DeveloperOptionsProtocol
@@ -20,10 +20,9 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve
private let clientProxy: ClientProxyProtocol?
init(developerOptions: DeveloperOptionsProtocol, elementCallBaseURL: URL, appHooks: AppHooks, clientProxy: ClientProxyProtocol?) {
init(developerOptions: DeveloperOptionsProtocol, appHooks: AppHooks, clientProxy: ClientProxyProtocol?) {
self.clientProxy = clientProxy
super.init(initialViewState: .init(elementCallBaseURL: elementCallBaseURL,
appHooks: appHooks,
super.init(initialViewState: .init(appHooks: appHooks,
shouldShowClearCache: clientProxy != nil,
isPresentedModally: clientProxy == nil,
bindings: .init(developerOptions: developerOptions)))
@@ -259,7 +259,6 @@ private extension Set<TraceLogPack> {
struct DeveloperOptionsScreen_Previews: PreviewProvider {
static let viewModel = DeveloperOptionsScreenViewModel(developerOptions: AppSettings.volatile(),
elementCallBaseURL: AppSettings.volatile().elementCallBaseURL,
appHooks: AppHooks(),
clientProxy: ClientProxyMock(.init()))
@@ -10,7 +10,7 @@ import Combine
import SwiftUI
final class LegalInformationScreenCoordinator: CoordinatorProtocol {
private let viewModel: LegalInformationScreenViewModel
private let viewModel: LegalInformationScreenViewModelProtocol
init(appSettings: AppSettings) {
viewModel = LegalInformationScreenViewModel(appSettings: appSettings)
@@ -8,7 +8,6 @@
import Combine
// periphery:ignore - markdown protocol
protocol LegalInformationScreenViewModelProtocol {
var context: LegalInformationScreenViewModelType.Context { get }
}
@@ -18,9 +18,7 @@ class NotificationSettingsEditScreenViewModel: NotificationSettingsEditScreenVie
private let userSession: UserSessionProtocol
private let roomSummaryProvider: RoomSummaryProviderProtocol?
// periphery:ignore - cancellable tasks get cancelled when reassigned
@CancellableTask private var fetchDefaultRoomNotificationModesTask: Task<Void, Error>?
// periphery:ignore - cancellable tasks get cancelled when reassigned
@CancellableTask private var updateRoomsWithUserDefinedModeTask: Task<Void, Error>?
var actions: AnyPublisher<NotificationSettingsEditScreenViewModelAction, Never> {
@@ -17,7 +17,6 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy
private let userNotificationCenter: UserNotificationCenterProtocol
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
private let userIndicatorController: UserIndicatorControllerProtocol
// periphery:ignore - cancellable tasks get cancelled when reassigned
@CancellableTask private var fetchSettingsTask: Task<Void, Error>?
private let notificationTonePreviewer: AudioPlayerProtocol
private let notificationToneManager: NotificationToneManagerProtocol
@@ -15,7 +15,6 @@ struct UserDetailsEditScreenCoordinatorParameters {
let mediaUploadingPreprocessor: MediaUploadingPreprocessor
weak var navigationStackCoordinator: NavigationStackCoordinator?
let userIndicatorController: UserIndicatorControllerProtocol
let appSettings: AppSettings
}
enum UserDetailsEditScreenCoordinatorAction {
@@ -27,8 +26,8 @@ final class UserDetailsEditScreenCoordinator: CoordinatorProtocol {
private var viewModel: UserDetailsEditScreenViewModelProtocol
private var cancellables = Set<AnyCancellable>()
private let actionsSubject: PassthroughSubject<RoomDetailsEditScreenCoordinatorAction, Never> = .init()
var actions: AnyPublisher<RoomDetailsEditScreenCoordinatorAction, Never> {
private let actionsSubject: PassthroughSubject<UserDetailsEditScreenCoordinatorAction, Never> = .init()
var actions: AnyPublisher<UserDetailsEditScreenCoordinatorAction, Never> {
actionsSubject.eraseToAnyPublisher()
}