Skip to content

Commit

Permalink
Merge pull request #170 from BCSDLab/feature/#147-follower
Browse files Browse the repository at this point in the history
Feature/#147 follower
  • Loading branch information
wnehdals authored Feb 26, 2024
2 parents bc80367 + 2339237 commit c404f43
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class FollowerActivity : BaseActivity<ActivityFollowerBinding>() {
showSnackBar(getString(R.string.main_page_search_edit_text_hint))
viewModel.cursor.value = UserCursor.FOLLOWER
} else {
userAdapter.submitList(emptyList())
viewModel.getUserSearch(it.toString(), 20, null)
viewModel.cursor.value = UserCursor.ALL
}
Expand Down Expand Up @@ -189,14 +190,14 @@ class FollowerActivity : BaseActivity<ActivityFollowerBinding>() {
viewModel.cursor.observe(this) {
when (it) {
UserCursor.ALL -> {
binding.rvRecentlyActiveFollower.visibility = View.GONE
binding.clRecentlyActiveFollower.visibility = View.GONE
binding.clAllFollower.visibility = View.GONE
binding.clRequestFollow.visibility = View.GONE
binding.clSearchResult.visibility = View.VISIBLE
}

UserCursor.FOLLOWER -> {
binding.rvRecentlyActiveFollower.visibility = View.VISIBLE
binding.clRecentlyActiveFollower.visibility = View.VISIBLE
binding.clAllFollower.visibility = View.VISIBLE
binding.clRequestFollow.visibility = View.VISIBLE
binding.clSearchResult.visibility = View.GONE
Expand Down

0 comments on commit c404f43

Please sign in to comment.