mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 22:15:41 +03:00
Merge pull request #4441 from nextcloud/issue-4405-fix-filter
Align filter behavior with web
This commit is contained in:
commit
3908d0ce14
1 changed files with 11 additions and 2 deletions
|
@ -1144,8 +1144,17 @@ class ConversationsListActivity :
|
||||||
private fun performFilterAndSearch(filter: String?) {
|
private fun performFilterAndSearch(filter: String?) {
|
||||||
if (filter!!.length >= SEARCH_MIN_CHARS) {
|
if (filter!!.length >= SEARCH_MIN_CHARS) {
|
||||||
clearMessageSearchResults()
|
clearMessageSearchResults()
|
||||||
|
|
||||||
|
if (hasFilterEnabled()) {
|
||||||
|
adapter?.updateDataSet(conversationItems)
|
||||||
adapter!!.setFilter(filter)
|
adapter!!.setFilter(filter)
|
||||||
adapter!!.filterItems()
|
adapter!!.filterItems()
|
||||||
|
adapter?.updateDataSet(filterableConversationItems)
|
||||||
|
} else {
|
||||||
|
adapter!!.setFilter(filter)
|
||||||
|
adapter!!.filterItems()
|
||||||
|
}
|
||||||
|
|
||||||
if (isUnifiedSearchAvailable(currentUser!!.capabilities!!.spreedCapability!!)) {
|
if (isUnifiedSearchAvailable(currentUser!!.capabilities!!.spreedCapability!!)) {
|
||||||
startMessageSearch(filter)
|
startMessageSearch(filter)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue