Faster viewID for Status

This commit is contained in:
Thomas Ricouard 2023-02-10 07:26:41 +01:00
parent 595e7b253b
commit 195ab4cd65
1 changed files with 4 additions and 1 deletions

View File

@ -57,7 +57,10 @@ public protocol AnyStatus {
extension AnyStatus {
public var viewId: String {
get {
"\(id)\(createdAt.asDate.description)\(editedAt?.asDate.description ?? "")"
if let editedAt {
return "\(id)\(editedAt.asDate.description)"
}
return id
}
}
}