Unverified Commit 5769e45c authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge pull request #2293 from NBAMIR/2292-nbamir

[IMPROVEMENT] Sorting on directory is applied immediately when checked. 
parents aa047343 d45c1280
......@@ -69,7 +69,6 @@ class DirectorySortingBottomSheetFragment : BottomSheetDialogFragment() {
override fun onCancel(dialog: DialogInterface?) {
super.onCancel(dialog)
directoryFragment.updateSorting(isSortByChannels, isSearchForGlobalUsers)
}
private fun setupView() {
......@@ -87,16 +86,19 @@ class DirectorySortingBottomSheetFragment : BottomSheetDialogFragment() {
checkSelection(text_channels, hashtagDrawable)
uncheckSelection(text_users, userDrawable)
isSortByChannels = true
directoryFragment.updateSorting(isSortByChannels, isSearchForGlobalUsers)
}
text_users.setOnClickListener {
checkSelection(text_users, userDrawable)
uncheckSelection(text_channels, hashtagDrawable)
isSortByChannels = false
directoryFragment.updateSorting(isSortByChannels, isSearchForGlobalUsers)
}
switch_global_users.setOnCheckedChangeListener { _, isChecked ->
isSearchForGlobalUsers = isChecked
directoryFragment.updateSorting(isSortByChannels, isSearchForGlobalUsers)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment