Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shimmer effect showing behind apps on blank search query #451

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class AppsFragment : Fragment(R.layout.fragment_apps), Toolbar.OnMenuItemClickLi
(binding.appListRV.adapter as AppsRVAdapter).submitList(list)
} else {
// If the list is empty, check if the search query is empty
if (viewModel.currentSearchQuery.value.isNullOrBlank()) {
if (viewModel.currentSearchQuery.value.isNullOrEmpty()) {
// If both list and search query are empty, show the shimmer layout
binding.shimmerLayout.visibility = View.VISIBLE
binding.appListRV.visibility = View.VISIBLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class AppsViewModel @Inject constructor(
}

// Sort by number of trackers in such a way that apps with more trackers
// come first hen apps with less or no trackers and finally apps which
// come first then apps with less or no trackers and finally apps which
// are not yet analyzed in the end.
SortType.Trackers -> {
_currentSortType.postValue(SortType.Trackers)
Expand Down