mirror of
https://github.com/lumaa-dev/BubbleApp.git
synced 2024-12-08 15:35:39 +01:00
29 lines
926 B
Swift
29 lines
926 B
Swift
|
//Made by Lumaa
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
public struct MessageContact: Identifiable, Decodable, Hashable, Equatable {
|
||
|
public let id: String
|
||
|
public let unread: Bool
|
||
|
public let lastStatus: Status?
|
||
|
public let accounts: [Account]
|
||
|
|
||
|
public init(id: String, unread: Bool, lastStatus: Status? = nil, accounts: [Account]) {
|
||
|
self.id = id
|
||
|
self.unread = unread
|
||
|
self.lastStatus = lastStatus
|
||
|
self.accounts = accounts
|
||
|
}
|
||
|
|
||
|
public static func placeholder() -> MessageContact {
|
||
|
.init(id: UUID().uuidString, unread: false, lastStatus: .placeholder(), accounts: [.placeholder()])
|
||
|
}
|
||
|
|
||
|
public static func placeholders() -> [MessageContact] {
|
||
|
[.placeholder(), .placeholder(), .placeholder(), .placeholder(), .placeholder(),
|
||
|
.placeholder(), .placeholder(), .placeholder(), .placeholder(), .placeholder()]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
extension MessageContact: Sendable {}
|