core: update simplexmq (time diff calculation); core, ios: add deleteAt to chat item info (#2440)

This commit is contained in:
spaced4ndy
2023-05-15 21:07:03 +04:00
committed by GitHub
parent 25156bb56c
commit a059739210
8 changed files with 47 additions and 28 deletions
@@ -49,6 +49,9 @@ struct ChatItemInfoView: View {
if !chatItemSent {
infoRow("Received at", localTimestamp(chatItemInfo.createdAt))
}
if let deleteAt = chatItemInfo.deleteAt {
infoRow("To be deleted at", localTimestamp(deleteAt))
}
if !chatItemInfo.itemVersions.isEmpty {
Divider()
@@ -122,6 +125,9 @@ struct ChatItemInfoView: View {
if !chatItemSent {
shareText += "Received at: \(localTimestamp(chatItemInfo.createdAt))" + nl
}
if let deleteAt = chatItemInfo.deleteAt {
shareText += "To be deleted at: \(localTimestamp(deleteAt))" + nl
}
if !chatItemInfo.itemVersions.isEmpty {
shareText += nl + "Edit history" + nl + nl
for (index, itemVersion) in chatItemInfo.itemVersions.enumerated() {
+1
View File
@@ -2954,6 +2954,7 @@ public struct ChatItemInfo: Decodable {
public var itemTs: Date
public var createdAt: Date
public var updatedAt: Date
public var deleteAt: Date?
public var itemVersions: [ChatItemVersion]
}