mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Removing Dead Code part 1 (#2234)
This commit is contained in:
@@ -343,9 +343,9 @@ class AudioRecorder: AudioRecorderProtocol {
|
||||
.store(in: &cancellables)
|
||||
|
||||
NotificationCenter.default.publisher(for: Notification.Name.AVAudioEngineConfigurationChange)
|
||||
.sink { [weak self] notification in
|
||||
.sink { [weak self] _ in
|
||||
guard let self else { return }
|
||||
self.handleConfigurationChange(notification: notification)
|
||||
self.handleConfigurationChange()
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
@@ -396,7 +396,7 @@ class AudioRecorder: AudioRecorderProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func handleConfigurationChange(notification: Notification) {
|
||||
func handleConfigurationChange() {
|
||||
guard let audioEngine else { return }
|
||||
MXLog.warning("Configuration changed: \(audioEngine.inputNode.inputFormat(forBus: 0))")
|
||||
if internalState != .suspended {
|
||||
|
||||
@@ -24,7 +24,6 @@ enum AudioRecorderError: Error, Equatable {
|
||||
case audioFileCreationFailure
|
||||
case interrupted
|
||||
case recordingCancelled
|
||||
case recordingFailed
|
||||
case recordPermissionNotGranted
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class AudioRecorderState: ObservableObject, Identifiable {
|
||||
recordingState = .stopped
|
||||
}
|
||||
|
||||
func reportError(_ error: Error) {
|
||||
func reportError() {
|
||||
recordingState = .error
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ class AudioRecorderState: ObservableObject, Identifiable {
|
||||
displayLink?.add(to: .current, forMode: .common)
|
||||
}
|
||||
|
||||
// periphery:ignore:parameters displayLink - required for objc selector
|
||||
@objc private func publishUpdate(displayLink: CADisplayLink) {
|
||||
if let currentTime = audioRecorder?.currentTime {
|
||||
duration = currentTime
|
||||
|
||||
Reference in New Issue
Block a user