         ) + 20)
     }
 
+    // MARK: Actions
+
     func viewDidTapped(_ sender: Any) {
         viewModel?.toggleCollpase()
         delegate?.viewDidCollpaseChange(view: self)
     }
+
+    private func addGestureIfNeeded() {
+        let containsGesture = gestureRecognizers?.contains(tapGesture) ?? false
+        if !containsGesture {
+            addGestureRecognizer(tapGesture)
+        }
+    }
 }


    weak var delegate: ChatMessageTextViewProtocol?

    var attachment: Attachment? {
        didSet {
            guard let attachment = attachment else { return }
            viewModel = ChatMessageTextViewModel(withAttachment: attachment)
            updateMessageInformation()
        }
    }

    var viewModel: ChatMessageTextViewModel?

    private static let imageViewDefaultWidth = CGFloat(50)


        return UITapGestureRecognizer(target: self, action: #selector(viewDidTapped(_:)))
    }()

    private func prepareView() {
        addGestureIfNeeded()
        updateLeftBorder()
        updateLabels()
        updateImageView()
    }

    // MARK: Layout

    private func updateLeftBorder() {
        viewLeftBorder.backgroundColor = viewModel?.color
    }

    private func updateLabels() {
        labelTitle.text = viewModel?.title
        labelDescription.text = viewModel?.text
    }

    private func updateImageView() {
        let updateConstraint = { [weak self] (constant: CGFloat) in
            self?.imageViewThumbWidthConstraint.constant = constant
            self?.layoutSubviews()
