         guard let label = collectionView.backgroundView as? UILabel else { return }
 
         if data.cells.count == 0 {
+            if data.isSearchingMessages && (searchBar.text == nil || searchBar.text == "")
+                    || data.isLoadingSearchResults {
+                label.text = ""
+                return
+            }
+
             label.text = localized("chat.messages.list.empty")
         } else {
             label.text = ""

        registerCells()

        if data.isSearchingMessages {
            setupSearchBar()
        } else {
            title = data.title

    }

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

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

        searchBar.resignFirstResponder()
    }
}

