Various improvements

This commit is contained in:
Ilya Laktyushin
2022-05-11 19:13:58 +04:00
parent ab0ec36112
commit eedfedbfc3
21 changed files with 371 additions and 211 deletions

View File

@@ -87,6 +87,7 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
self.animationBackgroundColor = UIColor(rgb: 0x474747)
}
var isUserInteractionEnabled = false
switch content {
case let .removedChat(text):
self.avatarNode = nil
@@ -696,7 +697,11 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
}), textAlignment: .natural)
self.textNode.attributedText = attributedText
self.textNode.maximumNumberOfLines = 2
if text.contains("](") {
isUserInteractionEnabled = true
}
displayUndo = false
self.originalRemainingSeconds = 3
@@ -879,6 +884,9 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode {
self.isUserInteractionEnabled = false
}
}
if isUserInteractionEnabled {
self.isUserInteractionEnabled = true
}
self.titleNode.isUserInteractionEnabled = false
self.textNode.isUserInteractionEnabled = self.textNode.tapAttributeAction != nil