Skip to content

Commit

Permalink
Fix order list reload on search view expand
Browse files Browse the repository at this point in the history
Ensure orders are reloaded only when the search query is cleared, not when the search view is expanded. This prevents unnecessary reloads and improves user experience.
  • Loading branch information
Joel Dean committed Feb 21, 2024
1 parent 6582d0a commit 21a28dd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,10 @@ class OrderListFragment :
override fun onQueryTextChange(newText: String): Boolean {
// only display the order status list if the search query is empty
if (newText.isEmpty()) {
if (searchQuery.isNotEmpty()) {
viewModel.loadOrders()
}

searchQuery = ""
}

Expand Down

0 comments on commit 21a28dd

Please sign in to comment.