mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Swift format enforce isEmpty rule (#5843)
* swift format enforce isEmpty rule * revert scheme * use trailing closure
This commit is contained in:
@@ -116,12 +116,12 @@ extension RoomInfoProxyProtocol {
|
||||
|
||||
// Check if the canonical alias matches the homeserver
|
||||
if let canonicalAlias,
|
||||
canonicalAlias.range(of: serverName) != nil {
|
||||
canonicalAlias.contains(serverName) {
|
||||
return canonicalAlias
|
||||
}
|
||||
|
||||
// Otherwise check the alternative aliases and return the first one that matches
|
||||
if let matchingAlternativeAlias = alternativeAliases.first(where: { $0.range(of: serverName) != nil }) {
|
||||
if let matchingAlternativeAlias = alternativeAliases.first(where: { $0.contains(serverName) }) {
|
||||
return matchingAlternativeAlias
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ nonisolated extension RoomSummary: CustomStringConvertible {
|
||||
return alias
|
||||
}
|
||||
|
||||
guard heroes.count > 0 else {
|
||||
guard !heroes.isEmpty else {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@ nonisolated struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
canBeRepliedTo: eventItemProxy.canBeRepliedTo,
|
||||
isDM: isDM,
|
||||
isDeclinedByMe: declinedBy.contains(userID),
|
||||
isDeclined: declinedBy.count > 0,
|
||||
isDeclined: !declinedBy.isEmpty,
|
||||
isVoiceCall: isVoiceCall,
|
||||
properties: .init())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user