Skip to content

Commit

Permalink
distinguish between initial no data and search no data
Browse files Browse the repository at this point in the history
  • Loading branch information
deeppp15 committed Jan 16, 2025
1 parent b32cc6f commit 9d1474a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,12 @@ class MySubmissionFragment : Fragment(), CompoundButton.OnCheckedChangeListener

val adapter = AdapterMySubmission(requireActivity(), submissions, exams)
val itemCount = adapter.itemCount
showNoData(fragmentMySubmissionBinding.tvMessage, itemCount, "submission")

if (itemCount == 0) {
fragmentMySubmissionBinding.llSearch.visibility = View.GONE
fragmentMySubmissionBinding.title.visibility = View.GONE
if(s.isNullOrEmpty()){
showNoData(fragmentMySubmissionBinding.tvMessage, itemCount, "submission")
if (itemCount == 0) {
fragmentMySubmissionBinding.llSearch.visibility = View.GONE
fragmentMySubmissionBinding.title.visibility = View.GONE
}
}
adapter.setmRealm(mRealm)
adapter.setType(type)
Expand Down

0 comments on commit 9d1474a

Please sign in to comment.