From f2d08c23a3e228af21b4c2d76b94e26217342b5c Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 2 Jul 2026 10:35:10 +0100 Subject: [PATCH] Run swiftformat. --- ElementX/Sources/Services/Room/JoinedRoomProxy.swift | 4 ++-- ElementX/Sources/Services/Room/RoomInfoProxyProtocol.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ElementX/Sources/Services/Room/JoinedRoomProxy.swift b/ElementX/Sources/Services/Room/JoinedRoomProxy.swift index 94aa5db47..66c572999 100644 --- a/ElementX/Sources/Services/Room/JoinedRoomProxy.swift +++ b/ElementX/Sources/Services/Room/JoinedRoomProxy.swift @@ -355,7 +355,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol { } func getMember(userID: String) async -> Result { - if let member = membersPublisher.value.filter({ $0.userID == userID }).first { + if let member = membersPublisher.value.first(where: { $0.userID == userID }) { return .success(member) } @@ -800,7 +800,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol { MXLog.info("Received typing notification update, typingUsers: \(typingUserIDs)") let typingMembers = typingUserIDs.compactMap { userID in - if let member = self.membersPublisher.value.filter({ $0.userID == userID }).first { + if let member = self.membersPublisher.value.first(where: { $0.userID == userID }) { return member.displayName ?? member.userID } else { return userID diff --git a/ElementX/Sources/Services/Room/RoomInfoProxyProtocol.swift b/ElementX/Sources/Services/Room/RoomInfoProxyProtocol.swift index 39f315be1..91c848483 100644 --- a/ElementX/Sources/Services/Room/RoomInfoProxyProtocol.swift +++ b/ElementX/Sources/Services/Room/RoomInfoProxyProtocol.swift @@ -121,7 +121,7 @@ extension RoomInfoProxyProtocol { } // Otherwise check the alternative aliases and return the first one that matches - if let matchingAlternativeAlias = alternativeAliases.filter({ $0.range(of: serverName) != nil }).first { + if let matchingAlternativeAlias = alternativeAliases.first(where: { $0.range(of: serverName) != nil }) { return matchingAlternativeAlias }