1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-14 10:47:30 +00:00

Revert "fix actionbar visual issues on follow"

This reverts commit a6194bf6b8.
This commit is contained in:
Austin Huang 2021-07-12 14:40:33 -04:00
parent b8ad359997
commit 723b35ca33
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F

View File

@ -69,6 +69,7 @@ class FollowViewerFragment : Fragment(), SwipeRefreshLayout.OnRefreshListener {
isFollowersList = fragmentArgs.isFollowersList isFollowersList = fragmentArgs.isFollowersList
username = fragmentArgs.username username = fragmentArgs.username
namePost = username namePost = username
setTitle(username)
binding.swipeRefreshLayout.setOnRefreshListener(this) binding.swipeRefreshLayout.setOnRefreshListener(this)
if (isCompare) listCompare() else listFollows() if (isCompare) listCompare() else listFollows()
viewModel.fetch(isFollowersList, null) viewModel.fetch(isFollowersList, null)
@ -101,6 +102,7 @@ class FollowViewerFragment : Fragment(), SwipeRefreshLayout.OnRefreshListener {
viewModel.comparison.removeObservers(viewLifecycleOwner) viewModel.comparison.removeObservers(viewLifecycleOwner)
viewModel.status.removeObservers(viewLifecycleOwner) viewModel.status.removeObservers(viewLifecycleOwner)
type = if (isFollowersList) R.string.followers_type_followers else R.string.followers_type_following type = if (isFollowersList) R.string.followers_type_followers else R.string.followers_type_following
setSubtitle(type)
val layoutManager = LinearLayoutManager(context) val layoutManager = LinearLayoutManager(context)
lazyLoader = RecyclerLazyLoader(layoutManager) { _, totalItemsCount -> lazyLoader = RecyclerLazyLoader(layoutManager) { _, totalItemsCount ->
binding.swipeRefreshLayout.isRefreshing = true binding.swipeRefreshLayout.isRefreshing = true
@ -123,7 +125,7 @@ class FollowViewerFragment : Fragment(), SwipeRefreshLayout.OnRefreshListener {
viewModel.getList(isFollowersList).removeObservers(viewLifecycleOwner) viewModel.getList(isFollowersList).removeObservers(viewLifecycleOwner)
binding.rvFollow.clearOnScrollListeners() binding.rvFollow.clearOnScrollListeners()
binding.swipeRefreshLayout.isRefreshing = true binding.swipeRefreshLayout.isRefreshing = true
type = R.string.followers_compare setSubtitle(R.string.followers_compare)
viewModel.status.observe(viewLifecycleOwner) {} viewModel.status.observe(viewLifecycleOwner) {}
viewModel.comparison.observe(viewLifecycleOwner) { viewModel.comparison.observe(viewLifecycleOwner) {
if (it != null) { if (it != null) {
@ -191,8 +193,6 @@ class FollowViewerFragment : Fragment(), SwipeRefreshLayout.OnRefreshListener {
followingModels: List<User>?, followingModels: List<User>?,
followersModels: List<User>? followersModels: List<User>?
) { ) {
setTitle(username)
setSubtitle(type)
val groups: ArrayList<ExpandableGroup> = ArrayList<ExpandableGroup>(1) val groups: ArrayList<ExpandableGroup> = ArrayList<ExpandableGroup>(1)
if (isCompare && followingModels != null && followersModels != null && allFollowing != null) { if (isCompare && followingModels != null && followersModels != null && allFollowing != null) {
if (followingModels.isNotEmpty()) groups.add( if (followingModels.isNotEmpty()) groups.add(