Run SwiftFormat.

This commit is contained in:
Doug
2026-05-27 14:38:50 +01:00
committed by Doug
parent 5138e05e47
commit fa67713726
573 changed files with 2426 additions and 2426 deletions
@@ -15,15 +15,15 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
let eventID: String
let receiverID: String
let roomID: String
var event: NotificationEvent? {
notificationItem.event
}
var senderDisplayName: String? {
notificationItem.senderInfo.displayName
}
var senderID: String {
switch notificationItem.event {
case .timeline(let event):
@@ -32,7 +32,7 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
return senderID
}
}
var roomDisplayName: String {
notificationItem.roomInfo.displayName
}
@@ -40,7 +40,7 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
var isRoomSpace: Bool {
notificationItem.roomInfo.isSpace
}
var isRoomDirect: Bool {
notificationItem.roomInfo.isDirect
}
@@ -57,11 +57,11 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
false
}
}
var roomJoinedMembers: Int {
Int(notificationItem.roomInfo.joinedMembersCount)
}
var isNoisy: Bool {
notificationItem.isNoisy ?? false
}
@@ -69,7 +69,7 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
var hasMention: Bool {
notificationItem.hasMention ?? false
}
var senderAvatarMediaSource: MediaSourceProxy? {
if let senderAvatarURLString = notificationItem.senderInfo.avatarUrl,
let senderAvatarURL = URL(string: senderAvatarURLString) {
@@ -77,7 +77,7 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
}
return nil
}
var roomAvatarMediaSource: MediaSourceProxy? {
if let roomAvatarURLString = notificationItem.roomInfo.avatarUrl,
let roomAvatarURL = URL(string: roomAvatarURLString) {
@@ -93,19 +93,19 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
struct EmptyNotificationItemProxy: NotificationItemProxyProtocol {
let eventID: String
var event: NotificationEvent? {
nil
}
let roomID: String
let receiverID: String
var senderID: String {
""
}
var senderDisplayName: String? {
nil
}
@@ -113,11 +113,11 @@ struct EmptyNotificationItemProxy: NotificationItemProxyProtocol {
var roomDisplayName: String {
""
}
var isNoisy: Bool {
false
}
var isRoomSpace: Bool {
false
}
@@ -133,15 +133,15 @@ struct EmptyNotificationItemProxy: NotificationItemProxyProtocol {
var isRoomPrivate: Bool {
false
}
var senderAvatarMediaSource: MediaSourceProxy? {
nil
}
var roomAvatarMediaSource: MediaSourceProxy? {
nil
}
var roomJoinedMembers: Int {
0
}
@@ -15,31 +15,31 @@ protocol NotificationItemProxyProtocol {
var event: NotificationEvent? { get }
var senderID: String { get }
var roomID: String { get }
var receiverID: String { get }
var senderDisplayName: String? { get }
var senderAvatarMediaSource: MediaSourceProxy? { get }
var roomDisplayName: String { get }
var roomAvatarMediaSource: MediaSourceProxy? { get }
var roomJoinedMembers: Int { get }
var isRoomSpace: Bool { get }
var isRoomDirect: Bool { get }
var isRoomPrivate: Bool { get }
var isDM: Bool { get }
var isNoisy: Bool { get }
var hasMention: Bool { get }
var threadRootEventID: String? { get }