         collectionView.register(MessageURLCell.nib, forCellWithReuseIdentifier: MessageURLCell.identifier)
         collectionView.register(MessageActionsCell.nib, forCellWithReuseIdentifier: MessageActionsCell.identifier)
 
+        view.bringSubviewToFront(buttonScrollToBottom)
+
         dataUpdateDelegate = self
         viewModel.controllerContext = self
         viewModel.onDataChanged = {

    }

}

        }
    }

    private let buttonScrollToBottomSize = CGFloat(70)
    lazy var buttonScrollToBottom: UIButton = {
        let button = UIButton()
        button.frame = CGRect(x: .greatestFiniteMagnitude, y: .greatestFiniteMagnitude, width: buttonScrollToBottomSize, height: buttonScrollToBottomSize)
        button.setImage(UIImage(named: "Float Button light"), for: .normal)
        button.addTarget(self, action: #selector(buttonScrollToBottomDidPressed), for: .touchUpInside)
        return button
    }()

    var scrollToBottomButtonIsVisible: Bool = false {
        didSet {
            guard oldValue != scrollToBottomButtonIsVisible
            else {
                return
            }

            func animates(_ animations: @escaping VoidCompletion) {
                UIView.animate(withDuration: 0.15, delay: 0, options: UIView.AnimationOptions(rawValue: 7 << 16), animations: {
                    animations()
                }, completion: nil)
            }

            if self.scrollToBottomButtonIsVisible {
                if buttonScrollToBottom.superview == nil {
                    view.addSubview(buttonScrollToBottom)
                }

                var frame = buttonScrollToBottom.frame
                frame.origin.x = collectionView.frame.width - buttonScrollToBottomSize - view.layoutMargins.right
                frame.origin.y = collectionView.frame.origin.y + collectionView.frame.height - buttonScrollToBottomSize - collectionView.layoutMargins.bottom - composerView.frame.height

                animates({
                    self.buttonScrollToBottom.frame = frame
                    self.buttonScrollToBottom.alpha = 1
                })
            } else {
                var frame = buttonScrollToBottom.frame
                frame.origin.x = collectionView.frame.width - buttonScrollToBottomSize - view.layoutMargins.right
                frame.origin.y = collectionView.frame.origin.y + collectionView.frame.height

                animates({
                    self.buttonScrollToBottom.frame = frame
                    self.buttonScrollToBottom.alpha = 0
                })
            }
        }
    }

    lazy var screenSize = view.frame.size

    override func viewDidLoad() {
        super.viewDidLoad()

        ThemeManager.addObserver(self)
        composerView.delegate = self

        collectionView.register(BasicMessageCell.nib, forCellWithReuseIdentifier: BasicMessageCell.identifier)
