[WIP] Quotes and link previews

This commit is contained in:
Ali
2023-10-18 01:11:23 +04:00
parent 137c3d9101
commit af8474aca5
88 changed files with 2582 additions and 966 deletions

View File

@@ -504,7 +504,17 @@ public final class ChatMessageItemImpl: ChatMessageItem, CustomStringConvertible
async {
let (top, bottom, dateAtBottom) = self.mergedWithItems(top: previousItem, bottom: nextItem)
let (layout, apply) = nodeLayout(self, params, top, bottom, dateAtBottom && !self.disableDate)
var disableDate = self.disableDate
if let subject = self.associatedData.subject, case let .messageOptions(_, _, info) = subject {
switch info {
case .reply, .link:
disableDate = true
default:
break
}
}
let (layout, apply) = nodeLayout(self, params, top, bottom, dateAtBottom && !disableDate)
Queue.mainQueue().async {
completion(layout, { info in
apply(animation, info, false)