Update API

This commit is contained in:
Ilya Laktyushin
2024-05-24 16:29:44 +04:00
parent 16b6083b6e
commit 0bb02041e8
21 changed files with 205 additions and 113 deletions

View File

@@ -1714,7 +1714,8 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
}
if canAddFactCheck {
let hasFactCheck = message.factCheckAttribute != nil
let sortedMessages = messages.sorted(by: { $0.id < $1.id })
let hasFactCheck = sortedMessages[0].factCheckAttribute != nil
let title: String
if hasFactCheck {
title = chatPresentationInterfaceState.strings.Conversation_ContextMenuEditFactCheck
@@ -1725,7 +1726,7 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/FactCheck"), color: theme.actionSheet.primaryTextColor)
}, action: { c, f in
c?.dismiss(completion: {
controllerInteraction.editMessageFactCheck(messages[0].id)
controllerInteraction.editMessageFactCheck(sortedMessages[0].id)
})
})))
}