mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Removing Dead Code part 1 (#2234)
This commit is contained in:
@@ -30,7 +30,6 @@ enum AppLockScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class AppLockScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: AppLockScreenCoordinatorParameters
|
||||
private var viewModel: AppLockScreenViewModelProtocol
|
||||
private let actionsSubject: PassthroughSubject<AppLockScreenCoordinatorAction, Never> = .init()
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
@@ -40,8 +39,6 @@ final class AppLockScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: AppLockScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
viewModel = AppLockScreenViewModel(appLockService: parameters.appLockService)
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -26,7 +26,6 @@ enum AppLockSetupBiometricsScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class AppLockSetupBiometricsScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: AppLockSetupBiometricsScreenCoordinatorParameters
|
||||
private var viewModel: AppLockSetupBiometricsScreenViewModelProtocol
|
||||
private let actionsSubject: PassthroughSubject<AppLockSetupBiometricsScreenCoordinatorAction, Never> = .init()
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
@@ -36,8 +35,6 @@ final class AppLockSetupBiometricsScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: AppLockSetupBiometricsScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
viewModel = AppLockSetupBiometricsScreenViewModel(appLockService: parameters.appLockService)
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -36,7 +36,6 @@ enum AppLockSetupPINScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class AppLockSetupPINScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: AppLockSetupPINScreenCoordinatorParameters
|
||||
private var viewModel: AppLockSetupPINScreenViewModelProtocol
|
||||
private let actionsSubject: PassthroughSubject<AppLockSetupPINScreenCoordinatorAction, Never> = .init()
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
@@ -48,7 +47,6 @@ final class AppLockSetupPINScreenCoordinator: CoordinatorProtocol {
|
||||
init(parameters: AppLockSetupPINScreenCoordinatorParameters) {
|
||||
guard parameters.initialMode != .confirm else { fatalError(".confirm is an invalid initial mode") }
|
||||
|
||||
self.parameters = parameters
|
||||
viewModel = AppLockSetupPINScreenViewModel(initialMode: parameters.initialMode,
|
||||
isMandatory: parameters.isMandatory,
|
||||
appLockService: parameters.appLockService)
|
||||
|
||||
+2
-2
@@ -45,7 +45,7 @@ class AppLockSetupPINScreenViewModel: AppLockSetupPINScreenViewModelType, AppLoc
|
||||
.debounce(for: 0.1, scheduler: DispatchQueue.main) // Show the last digit for long enough to be read.
|
||||
.sink { [weak self] pinCode in
|
||||
guard pinCode.count == 4 else { return }
|
||||
self?.submit(pinCode)
|
||||
self?.submit()
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
@@ -64,7 +64,7 @@ class AppLockSetupPINScreenViewModel: AppLockSetupPINScreenViewModelType, AppLoc
|
||||
// MARK: - Private
|
||||
|
||||
/// Handle the entered PIN code.
|
||||
private func submit(_ pinCode: String) {
|
||||
private func submit() {
|
||||
switch state.mode {
|
||||
case .create:
|
||||
createPIN()
|
||||
|
||||
-3
@@ -29,7 +29,6 @@ enum AppLockSetupSettingsScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class AppLockSetupSettingsScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: AppLockSetupSettingsScreenCoordinatorParameters
|
||||
private var viewModel: AppLockSetupSettingsScreenViewModelProtocol
|
||||
private let actionsSubject: PassthroughSubject<AppLockSetupSettingsScreenCoordinatorAction, Never> = .init()
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
@@ -39,8 +38,6 @@ final class AppLockSetupSettingsScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: AppLockSetupSettingsScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
viewModel = AppLockSetupSettingsScreenViewModel(appLockService: parameters.appLockService)
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,7 @@ import SwiftUI
|
||||
|
||||
@MainActor
|
||||
protocol AuthenticationCoordinatorDelegate: AnyObject {
|
||||
func authenticationCoordinator(_ authenticationCoordinator: AuthenticationCoordinator,
|
||||
didLoginWithSession userSession: UserSessionProtocol)
|
||||
func authenticationCoordinator(didLoginWithSession userSession: UserSessionProtocol)
|
||||
}
|
||||
|
||||
class AuthenticationCoordinator: CoordinatorProtocol {
|
||||
@@ -34,6 +33,7 @@ class AuthenticationCoordinator: CoordinatorProtocol {
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
|
||||
private var oidcPresenter: OIDCAuthenticationPresenter?
|
||||
// periphery: ignore - used to store the coordinator to avoid deallocation
|
||||
private var appLockFlowCoordinator: AppLockSetupFlowCoordinator?
|
||||
|
||||
weak var delegate: AuthenticationCoordinatorDelegate?
|
||||
@@ -245,7 +245,7 @@ class AuthenticationCoordinator: CoordinatorProtocol {
|
||||
} else if analytics.shouldShowAnalyticsPrompt {
|
||||
showAnalyticsPrompt(userSession: userSession)
|
||||
} else {
|
||||
delegate?.authenticationCoordinator(self, didLoginWithSession: userSession)
|
||||
delegate?.authenticationCoordinator(didLoginWithSession: userSession)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ class AuthenticationCoordinator: CoordinatorProtocol {
|
||||
if analytics.shouldShowAnalyticsPrompt {
|
||||
showAnalyticsPrompt(userSession: userSession)
|
||||
} else {
|
||||
delegate?.authenticationCoordinator(self, didLoginWithSession: userSession)
|
||||
delegate?.authenticationCoordinator(didLoginWithSession: userSession)
|
||||
}
|
||||
case .forceLogout:
|
||||
fatalError("The PIN creation flow should not fail.")
|
||||
@@ -281,7 +281,7 @@ class AuthenticationCoordinator: CoordinatorProtocol {
|
||||
guard let self else { return }
|
||||
switch action {
|
||||
case .done:
|
||||
delegate?.authenticationCoordinator(self, didLoginWithSession: userSession)
|
||||
delegate?.authenticationCoordinator(didLoginWithSession: userSession)
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
@@ -44,7 +44,6 @@ public extension TextFieldStyle where Self == AuthenticationTextFieldStyle {
|
||||
/// The text field style used in authentication screens.
|
||||
public struct AuthenticationTextFieldStyle: TextFieldStyle {
|
||||
@Environment(\.isEnabled) private var isEnabled
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
|
||||
@FocusState private var isFocused: Bool
|
||||
public let labelText: Text?
|
||||
|
||||
@@ -24,6 +24,7 @@ class BugReportScreenViewModel: BugReportScreenViewModelType, BugReportScreenVie
|
||||
private let userID: String
|
||||
private let deviceID: String?
|
||||
private let actionsSubject: PassthroughSubject<BugReportScreenViewModelAction, Never> = .init()
|
||||
// periphery:ignore - when set to nil this is automatically cancelled
|
||||
@CancellableTask private var uploadTask: Task<Void, Never>?
|
||||
|
||||
var actions: AnyPublisher<BugReportScreenViewModelAction, Never> {
|
||||
|
||||
@@ -140,12 +140,6 @@ struct BugReportScreen: View {
|
||||
// MARK: - Previews
|
||||
|
||||
struct BugReport_Previews: PreviewProvider, TestablePreview {
|
||||
static let viewModel = BugReportScreenViewModel(bugReportService: BugReportServiceMock(),
|
||||
userID: "@mock.client.com",
|
||||
deviceID: nil,
|
||||
screenshot: nil,
|
||||
isModallyPresented: false)
|
||||
|
||||
static var previews: some View {
|
||||
NavigationStack {
|
||||
BugReportScreen(context: BugReportScreenViewModel(bugReportService: BugReportServiceMock(),
|
||||
|
||||
@@ -32,7 +32,6 @@ enum CallScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class CallScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: CallScreenCoordinatorParameters
|
||||
private var viewModel: CallScreenViewModelProtocol
|
||||
private let actionsSubject: PassthroughSubject<CallScreenCoordinatorAction, Never> = .init()
|
||||
|
||||
@@ -42,8 +41,6 @@ final class CallScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: CallScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
viewModel = CallScreenViewModel(roomProxy: parameters.roomProxy,
|
||||
callBaseURL: parameters.callBaseURL,
|
||||
clientID: parameters.clientID,
|
||||
|
||||
@@ -23,13 +23,13 @@ typealias CallScreenViewModelType = StateStoreViewModel<CallScreenViewState, Cal
|
||||
|
||||
class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol {
|
||||
private let roomProxy: RoomProxyProtocol
|
||||
private let callBaseURL: URL
|
||||
private let clientID: String
|
||||
|
||||
private let widgetDriver: ElementCallWidgetDriverProtocol
|
||||
|
||||
private let callController = CXCallController()
|
||||
// periphery: ignore - call kit magic do not remove
|
||||
private let callProvider = CXProvider(configuration: .init())
|
||||
|
||||
private let callID = UUID()
|
||||
|
||||
private let actionsSubject: PassthroughSubject<CallScreenViewModelAction, Never> = .init()
|
||||
@@ -51,8 +51,6 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
clientID: String,
|
||||
useEncryption: Bool) {
|
||||
self.roomProxy = roomProxy
|
||||
self.callBaseURL = callBaseURL
|
||||
self.clientID = clientID
|
||||
|
||||
widgetDriver = roomProxy.elementCallWidgetDriver()
|
||||
|
||||
@@ -132,12 +130,14 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
|
||||
// MARK: - CXCallObserverDelegate
|
||||
|
||||
// periphery: ignore - call kit magic do not remove
|
||||
func callObserver(_ callObserver: CXCallObserver, callChanged call: CXCall) {
|
||||
MXLog.info("Call changed: \(call)")
|
||||
}
|
||||
|
||||
// MARK: - CXProviderDelegate
|
||||
|
||||
// periphery: ignore - call kit magic do not remove
|
||||
func providerDidReset(_ provider: CXProvider) {
|
||||
MXLog.info("Call provider did reset: \(provider)")
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ private struct WebView: UIViewRepresentable {
|
||||
@MainActor
|
||||
class Coordinator: NSObject, WKScriptMessageHandler, WKUIDelegate, WKNavigationDelegate {
|
||||
private let viewModelContext: CallScreenViewModel.Context
|
||||
private var webViewURLObservation: NSKeyValueObservation?
|
||||
|
||||
private(set) var webView: WKWebView!
|
||||
|
||||
|
||||
@@ -30,15 +30,6 @@ enum SuggestionItem: Identifiable, Equatable {
|
||||
return PillConstants.atRoom
|
||||
}
|
||||
}
|
||||
|
||||
var name: String? {
|
||||
switch self {
|
||||
case .user(let user):
|
||||
return user.displayName
|
||||
case .allUsers:
|
||||
return PillConstants.everyone
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct MentionSuggestionItem: Identifiable, Equatable {
|
||||
|
||||
@@ -25,6 +25,7 @@ struct SuggestionPattern: Equatable {
|
||||
let text: String
|
||||
}
|
||||
|
||||
// periphery: ignore - markdown protocol
|
||||
protocol ComposerToolbarViewModelProtocol {
|
||||
var actions: AnyPublisher<ComposerToolbarViewModelAction, Never> { get }
|
||||
var context: ComposerToolbarViewModelType.Context { get }
|
||||
|
||||
@@ -313,8 +313,8 @@ struct ComposerToolbar_Previews: PreviewProvider, TestablePreview {
|
||||
VStack(spacing: 8) {
|
||||
ComposerToolbar.textWithVoiceMessage(focused: false)
|
||||
ComposerToolbar.textWithVoiceMessage(focused: true)
|
||||
ComposerToolbar.voiceMessageRecordingMock(recording: true)
|
||||
ComposerToolbar.voiceMessagePreviewMock(recording: false, uploading: false)
|
||||
ComposerToolbar.voiceMessageRecordingMock()
|
||||
ComposerToolbar.voiceMessagePreviewMock(uploading: false)
|
||||
}
|
||||
.previewDisplayName("Voice Message")
|
||||
}
|
||||
@@ -355,7 +355,7 @@ extension ComposerToolbar {
|
||||
keyCommandHandler: { _ in false })
|
||||
}
|
||||
|
||||
static func voiceMessageRecordingMock(recording: Bool) -> ComposerToolbar {
|
||||
static func voiceMessageRecordingMock() -> ComposerToolbar {
|
||||
let wysiwygViewModel = WysiwygComposerViewModel()
|
||||
var composerViewModel: ComposerToolbarViewModel {
|
||||
let model = ComposerToolbarViewModel(wysiwygViewModel: wysiwygViewModel,
|
||||
@@ -371,7 +371,7 @@ extension ComposerToolbar {
|
||||
keyCommandHandler: { _ in false })
|
||||
}
|
||||
|
||||
static func voiceMessagePreviewMock(recording: Bool, uploading: Bool) -> ComposerToolbar {
|
||||
static func voiceMessagePreviewMock(uploading: Bool) -> ComposerToolbar {
|
||||
let wysiwygViewModel = WysiwygComposerViewModel()
|
||||
let waveformData: [Float] = Array(repeating: 1.0, count: 1000)
|
||||
var composerViewModel: ComposerToolbarViewModel {
|
||||
|
||||
@@ -33,7 +33,6 @@ enum CreateRoomCoordinatorAction {
|
||||
}
|
||||
|
||||
final class CreateRoomCoordinator: CoordinatorProtocol {
|
||||
private let parameters: CreateRoomCoordinatorParameters
|
||||
private var viewModel: CreateRoomViewModelProtocol
|
||||
private let actionsSubject: PassthroughSubject<CreateRoomCoordinatorAction, Never> = .init()
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
@@ -43,7 +42,6 @@ final class CreateRoomCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: CreateRoomCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
viewModel = CreateRoomViewModel(userSession: parameters.userSession,
|
||||
createRoomParameters: parameters.createRoomParameters,
|
||||
selectedUsers: parameters.selectedUsers,
|
||||
|
||||
@@ -39,7 +39,6 @@ enum HomeScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class HomeScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: HomeScreenCoordinatorParameters
|
||||
private var viewModel: HomeScreenViewModelProtocol
|
||||
|
||||
private let actionsSubject: PassthroughSubject<HomeScreenCoordinatorAction, Never> = .init()
|
||||
@@ -50,13 +49,9 @@ final class HomeScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: HomeScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
viewModel = HomeScreenViewModel(userSession: parameters.userSession,
|
||||
attributedStringBuilder: parameters.attributedStringBuilder,
|
||||
selectedRoomPublisher: parameters.selectedRoomPublisher,
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
analytics: ServiceLocator.shared.analytics,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
|
||||
viewModel.actions
|
||||
|
||||
@@ -21,9 +21,7 @@ typealias HomeScreenViewModelType = StateStoreViewModel<HomeScreenViewState, Hom
|
||||
|
||||
class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol {
|
||||
private let userSession: UserSessionProtocol
|
||||
private let attributedStringBuilder: AttributedStringBuilderProtocol
|
||||
private let appSettings: AppSettings
|
||||
private let analytics: AnalyticsService
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
|
||||
private let roomSummaryProvider: RoomSummaryProviderProtocol?
|
||||
@@ -39,15 +37,11 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
}
|
||||
|
||||
init(userSession: UserSessionProtocol,
|
||||
attributedStringBuilder: AttributedStringBuilderProtocol,
|
||||
selectedRoomPublisher: CurrentValuePublisher<String?, Never>,
|
||||
appSettings: AppSettings,
|
||||
analytics: AnalyticsService,
|
||||
userIndicatorController: UserIndicatorControllerProtocol) {
|
||||
self.userSession = userSession
|
||||
self.attributedStringBuilder = attributedStringBuilder
|
||||
self.appSettings = appSettings
|
||||
self.analytics = analytics
|
||||
self.userIndicatorController = userIndicatorController
|
||||
|
||||
roomSummaryProvider = userSession.clientProxy.roomSummaryProvider
|
||||
|
||||
@@ -306,14 +306,9 @@ struct HomeScreen_Previews: PreviewProvider, TestablePreview {
|
||||
mediaProvider: MockMediaProvider(),
|
||||
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
||||
|
||||
let attributedStringBuilder = AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||
mentionBuilder: MentionBuilder())
|
||||
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
attributedStringBuilder: attributedStringBuilder,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
analytics: ServiceLocator.shared.analytics,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,10 +155,8 @@ struct HomeScreenEmptyStateView_Previews: PreviewProvider, TestablePreview {
|
||||
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
||||
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL, mentionBuilder: MentionBuilder()),
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
analytics: ServiceLocator.shared.analytics,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -72,14 +72,9 @@ struct HomeScreenRecoveryKeyConfirmationBanner_Previews: PreviewProvider, Testab
|
||||
mediaProvider: MockMediaProvider(),
|
||||
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
||||
|
||||
let attributedStringBuilder = AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||
mentionBuilder: MentionBuilder())
|
||||
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
attributedStringBuilder: attributedStringBuilder,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
analytics: ServiceLocator.shared.analytics,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,11 +186,8 @@ struct HomeScreenRoomCell_Previews: PreviewProvider, TestablePreview {
|
||||
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
||||
|
||||
let viewModel = HomeScreenViewModel(userSession: userSession,
|
||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||
mentionBuilder: MentionBuilder()),
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
analytics: ServiceLocator.shared.analytics,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
|
||||
let rooms: [HomeScreenRoom] = summaryProvider.roomListPublisher.value.compactMap { summary -> HomeScreenRoom? in
|
||||
|
||||
@@ -72,14 +72,9 @@ struct HomeScreenSessionVerificationBanner_Previews: PreviewProvider, TestablePr
|
||||
mediaProvider: MockMediaProvider(),
|
||||
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
||||
|
||||
let attributedStringBuilder = AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||
mentionBuilder: MentionBuilder())
|
||||
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
attributedStringBuilder: attributedStringBuilder,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
analytics: ServiceLocator.shared.analytics,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ import Compound
|
||||
import SwiftUI
|
||||
|
||||
struct HomeScreenUserMenuButton: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
|
||||
@ObservedObject var context: HomeScreenViewModel.Context
|
||||
|
||||
var body: some View {
|
||||
|
||||
@@ -518,7 +518,7 @@ class RoomScreenInteractionHandler {
|
||||
}
|
||||
} catch {
|
||||
MXLog.error("Failed to load voice message: \(error)")
|
||||
audioPlayerState.reportError(error)
|
||||
audioPlayerState.reportError()
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
+1
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
// periphery: ignore - markdown protocol
|
||||
protocol TextBasedRoomTimelineViewProtocol {
|
||||
associatedtype TimelineItemType: TextBasedRoomTimelineItem
|
||||
|
||||
|
||||
-2
@@ -20,11 +20,9 @@ import SwiftUI
|
||||
typealias AnalyticsSettingsScreenViewModelType = StateStoreViewModel<AnalyticsSettingsScreenViewState, AnalyticsSettingsScreenViewAction>
|
||||
|
||||
class AnalyticsSettingsScreenViewModel: AnalyticsSettingsScreenViewModelType, AnalyticsSettingsScreenViewModelProtocol {
|
||||
private let appSettings: AppSettings
|
||||
private let analytics: AnalyticsService
|
||||
|
||||
init(appSettings: AppSettings, analytics: AnalyticsService) {
|
||||
self.appSettings = appSettings
|
||||
self.analytics = analytics
|
||||
|
||||
let strings = AnalyticsSettingsScreenStrings(termsURL: appSettings.analyticsConfiguration.termsURL)
|
||||
|
||||
+1
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
// periphery:ignore:all - subscripts lead to false positives
|
||||
import Foundation
|
||||
|
||||
struct AdvancedSettingsScreenViewState: BindableState {
|
||||
|
||||
+1
@@ -24,6 +24,7 @@ struct DeveloperOptionsScreenViewState: BindableState {
|
||||
var bindings: DeveloperOptionsScreenViewStateBindings
|
||||
}
|
||||
|
||||
// periphery: ignore - subscripts are seen as false positive
|
||||
@dynamicMemberLookup
|
||||
struct DeveloperOptionsScreenViewStateBindings {
|
||||
private let developerOptions: DeveloperOptionsProtocol
|
||||
|
||||
Reference in New Issue
Block a user