mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Silence some warnings. (#4747)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Combine
|
||||
@preconcurrency import Combine
|
||||
import CryptoKit
|
||||
import Foundation
|
||||
import OrderedCollections
|
||||
@@ -208,7 +208,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
loadUserAvatarURLFromCache()
|
||||
|
||||
ignoredUsersListenerTaskHandle = client.subscribeToIgnoredUsers(listener: IgnoredUsersListenerProxy { [weak self] ignoredUsers in
|
||||
ignoredUsersListenerTaskHandle = client.subscribeToIgnoredUsers(listener: SDKListener { [weak self] ignoredUsers in
|
||||
self?.ignoredUsersSubject.send(ignoredUsers)
|
||||
})
|
||||
|
||||
@@ -218,7 +218,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
Task { await self?.updateVerificationState(verificationState) }
|
||||
})
|
||||
|
||||
sendQueueListenerTaskHandle = client.subscribeToSendQueueStatus(listener: SendQueueRoomErrorListenerProxy { [weak self] roomID, error in
|
||||
sendQueueListenerTaskHandle = client.subscribeToSendQueueStatus(listener: SDKListener { [weak self] roomID, error in
|
||||
MXLog.error("Send queue failed in room: \(roomID) with error: \(error)")
|
||||
self?.sendQueueStatusSubject.send(false)
|
||||
})
|
||||
@@ -1143,10 +1143,10 @@ class ClientProxy: ClientProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
private class ClientDelegateWrapper: ClientDelegate {
|
||||
private let authErrorCallback: (Bool) -> Void
|
||||
private final class ClientDelegateWrapper: ClientDelegate {
|
||||
private let authErrorCallback: @Sendable (Bool) -> Void
|
||||
|
||||
init(authErrorCallback: @escaping (Bool) -> Void) {
|
||||
init(authErrorCallback: @escaping @Sendable (Bool) -> Void) {
|
||||
self.authErrorCallback = authErrorCallback
|
||||
}
|
||||
|
||||
@@ -1162,7 +1162,7 @@ private class ClientDelegateWrapper: ClientDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
private class ClientDecryptionErrorDelegate: UnableToDecryptDelegate {
|
||||
private final class ClientDecryptionErrorDelegate: UnableToDecryptDelegate {
|
||||
private let actionsSubject: PassthroughSubject<ClientProxyAction, Never>
|
||||
|
||||
init(actionsSubject: PassthroughSubject<ClientProxyAction, Never>) {
|
||||
@@ -1174,30 +1174,6 @@ private class ClientDecryptionErrorDelegate: UnableToDecryptDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
private class IgnoredUsersListenerProxy: IgnoredUsersListener {
|
||||
private let onUpdateClosure: ([String]) -> Void
|
||||
|
||||
init(onUpdateClosure: @escaping ([String]) -> Void) {
|
||||
self.onUpdateClosure = onUpdateClosure
|
||||
}
|
||||
|
||||
func call(ignoredUserIds: [String]) {
|
||||
onUpdateClosure(ignoredUserIds)
|
||||
}
|
||||
}
|
||||
|
||||
private class SendQueueRoomErrorListenerProxy: SendQueueRoomErrorListener {
|
||||
private let onErrorClosure: (String, ClientError) -> Void
|
||||
|
||||
init(onErrorClosure: @escaping (String, ClientError) -> Void) {
|
||||
self.onErrorClosure = onErrorClosure
|
||||
}
|
||||
|
||||
func onError(roomId: String, error: ClientError) {
|
||||
onErrorClosure(roomId, error)
|
||||
}
|
||||
}
|
||||
|
||||
private struct ClientProxyServices {
|
||||
let syncService: SyncService
|
||||
let roomListService: RoomListService
|
||||
|
||||
@@ -10,7 +10,7 @@ import CallKit
|
||||
// sourcery: AutoMockable
|
||||
protocol CXProviderProtocol {
|
||||
func setDelegate(_ delegate: CXProviderDelegate?, queue: DispatchQueue?)
|
||||
func reportNewIncomingCall(with uuid: UUID, update: CXCallUpdate, completion: @escaping (Error?) -> Void)
|
||||
func reportNewIncomingCall(with uuid: UUID, update: CXCallUpdate, completion: @escaping @Sendable (Error?) -> Void)
|
||||
func reportCall(with uuid: UUID, endedAt: Date?, reason: CXCallEndedReason)
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ struct ElementCallWidgetMessage: Codable {
|
||||
}
|
||||
}
|
||||
|
||||
class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriverProtocol {
|
||||
final class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriverProtocol {
|
||||
private let room: RoomProtocol
|
||||
private let deviceID: String
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import KeychainAccess
|
||||
@preconcurrency import KeychainAccess
|
||||
import MatrixRustSDK
|
||||
|
||||
enum KeychainControllerService: String {
|
||||
@@ -23,7 +23,7 @@ enum KeychainControllerService: String {
|
||||
}
|
||||
}
|
||||
|
||||
class KeychainController: KeychainControllerProtocol {
|
||||
final class KeychainController: KeychainControllerProtocol {
|
||||
/// The keychain responsible for storing account restoration tokens (keyed by userID).
|
||||
private let restorationTokenKeychain: Keychain
|
||||
/// The keychain responsible for storing all other secrets in the app (keyed by `Key`s).
|
||||
|
||||
@@ -58,7 +58,7 @@ extension MediaFileHandleProxy: Hashable {
|
||||
/// An unmanaged file handle that can be created direct from a URL.
|
||||
///
|
||||
/// This type allows for mocking but doesn't provide the automatic clean-up mechanism provided by the SDK.
|
||||
private class UnmanagedMediaFileHandle: MediaFileHandleProtocol {
|
||||
private final class UnmanagedMediaFileHandle: MediaFileHandleProtocol {
|
||||
func persist(path: String) throws -> Bool {
|
||||
false
|
||||
}
|
||||
|
||||
@@ -739,7 +739,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
// MARK: - Private
|
||||
|
||||
private func subscribeToTypingNotifications() {
|
||||
typingNotificationObservationToken = room.subscribeToTypingNotifications(listener: RoomTypingNotificationUpdateListener { [weak self] typingUserIDs in
|
||||
typingNotificationObservationToken = room.subscribeToTypingNotifications(listener: SDKListener { [weak self] typingUserIDs in
|
||||
guard let self else { return }
|
||||
|
||||
MXLog.info("Received typing notification update, typingUsers: \(typingUserIDs)")
|
||||
@@ -758,7 +758,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
|
||||
private func subscribeToIdentityStatusChanges() async {
|
||||
do {
|
||||
identityStatusChangesObservationToken = try await room.subscribeToIdentityStatusChanges(listener: RoomIdentityStatusChangeListener { [weak self] changes in
|
||||
identityStatusChangesObservationToken = try await room.subscribeToIdentityStatusChanges(listener: SDKListener { [weak self] changes in
|
||||
guard let self else { return }
|
||||
|
||||
MXLog.info("Received identity status changes: \(changes)")
|
||||
@@ -772,7 +772,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
|
||||
private func subscribeToKnockRequests() async {
|
||||
do {
|
||||
knockRequestsChangesObservationToken = try await room.subscribeToKnockRequests(listener: RoomKnockRequestsListener { [weak self] requests in
|
||||
knockRequestsChangesObservationToken = try await room.subscribeToKnockRequests(listener: SDKListener { [weak self] requests in
|
||||
guard let self else { return }
|
||||
|
||||
MXLog.info("Received requests to join update, requests id: \(requests.map(\.eventId))")
|
||||
@@ -801,39 +801,3 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
return .exclude(eventTypes: stateEventFilters.map { FilterTimelineEventType.state(eventType: $0) })
|
||||
}()
|
||||
}
|
||||
|
||||
private final class RoomTypingNotificationUpdateListener: TypingNotificationsListener {
|
||||
private let onUpdateClosure: ([String]) -> Void
|
||||
|
||||
init(_ onUpdateClosure: @escaping ([String]) -> Void) {
|
||||
self.onUpdateClosure = onUpdateClosure
|
||||
}
|
||||
|
||||
func call(typingUserIds: [String]) {
|
||||
onUpdateClosure(typingUserIds)
|
||||
}
|
||||
}
|
||||
|
||||
private final class RoomIdentityStatusChangeListener: IdentityStatusChangeListener {
|
||||
private let onUpdateClosure: ([IdentityStatusChange]) -> Void
|
||||
|
||||
init(_ onUpdateClosure: @escaping ([IdentityStatusChange]) -> Void) {
|
||||
self.onUpdateClosure = onUpdateClosure
|
||||
}
|
||||
|
||||
func call(identityStatusChange: [IdentityStatusChange]) {
|
||||
onUpdateClosure(identityStatusChange)
|
||||
}
|
||||
}
|
||||
|
||||
private final class RoomKnockRequestsListener: KnockRequestsListener {
|
||||
private let onUpdateClosure: ([KnockRequest]) -> Void
|
||||
|
||||
init(_ onUpdateClosure: @escaping ([KnockRequest]) -> Void) {
|
||||
self.onUpdateClosure = onUpdateClosure
|
||||
}
|
||||
|
||||
func call(joinRequests: [KnockRequest]) {
|
||||
onUpdateClosure(joinRequests)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import Combine
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
|
||||
private class WeakSessionVerificationControllerProxy: SessionVerificationControllerDelegate {
|
||||
private final class WeakSessionVerificationControllerProxy: SessionVerificationControllerDelegate {
|
||||
private weak var proxy: SessionVerificationControllerProxy?
|
||||
|
||||
init(proxy: SessionVerificationControllerProxy) {
|
||||
|
||||
Reference in New Issue
Block a user