                     completion?()
                     return
                 }
+
                 var cellsPage = [CellData(message: nil, date: lastMessage.createdAt ?? Date(timeIntervalSince1970: 0))]
                 messages.forEach { message in
                     if lastMessage.createdAt?.day != message.createdAt?.day ||


    var title: String = localized("chat.messages.list.title")

    var isSearchingMessages: Bool = false
    var isListingMentions: Bool = false
    var isShowingAllMessages: Bool {

    }

    @objc func close() {
        hideKeyboard()
        presentingViewController?.dismiss(animated: true, completion: nil)
    }

    @objc func hideKeyboard() {
        guard data.isSearchingMessages else {
            return
        }

        searchBar.resignFirstResponder()
    }
}

