[WIP] Chat Import

This commit is contained in:
Ali
2021-01-21 20:04:13 +04:00
parent fe491b6831
commit 85402a67cb
35 changed files with 3759 additions and 3454 deletions

View File

@@ -84,6 +84,7 @@ final class ChatMessageInteractiveFileNode: ASDisplayNode {
var toggleSelection: (Bool) -> Void = { _ in }
var activateLocalContent: () -> Void = { }
var requestUpdateLayout: (Bool) -> Void = { _ in }
var displayImportedTooltip: (ASDisplayNode) -> Void = { _ in }
private var context: AccountContext?
private var message: Message?
@@ -729,6 +730,17 @@ final class ChatMessageInteractiveFileNode: ASDisplayNode {
}
strongSelf.updateStatus(animated: isAnimated)
if let forwardInfo = message.forwardInfo, forwardInfo.flags.contains(.isImported) {
strongSelf.dateAndStatusNode.pressed = {
guard let strongSelf = self else {
return
}
strongSelf.displayImportedTooltip(strongSelf.dateAndStatusNode)
}
} else {
strongSelf.dateAndStatusNode.pressed = nil
}
}
})
})