From c30b2df5ac0f5b7f5e3b2a4825bff5003ea985b5 Mon Sep 17 00:00:00 2001 From: Abhilipsa Sahoo Date: Tue, 12 Jul 2022 15:38:58 +0530 Subject: [PATCH 1/3] Update MembersFragment.kt --- .../mentorship/view/fragments/MembersFragment.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt b/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt index 6e6f727bc..6e1ac57ab 100644 --- a/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt +++ b/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt @@ -140,6 +140,17 @@ class MembersFragment : BaseFragment() { Toast.LENGTH_SHORT).show() } } + if (!filterMap["skills"].isNullOrEmpty()) { + + val hasUsersWithSkills = membersViewModel.userList.any { + (it.skills)?.contains(filterMap["skills"]!!, ignoreCase = true) == true + } + + if (!hasUsersWithSkills) { + Toast.makeText(activity, getString(R.string.error_filter_not_found), + Toast.LENGTH_SHORT).show() + } + } } memberListInitialized = true tvEmptyList.visibility = View.GONE From 72ba2c062760ae8b8655db8536061f21a672b136 Mon Sep 17 00:00:00 2001 From: Abhilipsa Sahoo Date: Tue, 12 Jul 2022 15:48:32 +0530 Subject: [PATCH 2/3] fix: update all instances of systers to anitab in code (#1164) --- .../mentorship/view/fragments/MembersFragment.kt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt b/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt index 6e1ac57ab..6e6f727bc 100644 --- a/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt +++ b/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt @@ -140,17 +140,6 @@ class MembersFragment : BaseFragment() { Toast.LENGTH_SHORT).show() } } - if (!filterMap["skills"].isNullOrEmpty()) { - - val hasUsersWithSkills = membersViewModel.userList.any { - (it.skills)?.contains(filterMap["skills"]!!, ignoreCase = true) == true - } - - if (!hasUsersWithSkills) { - Toast.makeText(activity, getString(R.string.error_filter_not_found), - Toast.LENGTH_SHORT).show() - } - } } memberListInitialized = true tvEmptyList.visibility = View.GONE From b392e0552e001aea86d15db21accb090cec39363 Mon Sep 17 00:00:00 2001 From: Abhilipsa Sahoo Date: Tue, 12 Jul 2022 15:55:11 +0530 Subject: [PATCH 3/3] fix: added toast message when no common skill found --- .../mentorship/view/fragments/MembersFragment.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt b/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt index 6e6f727bc..6e1ac57ab 100644 --- a/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt +++ b/app/src/main/java/org/anitab/mentorship/view/fragments/MembersFragment.kt @@ -140,6 +140,17 @@ class MembersFragment : BaseFragment() { Toast.LENGTH_SHORT).show() } } + if (!filterMap["skills"].isNullOrEmpty()) { + + val hasUsersWithSkills = membersViewModel.userList.any { + (it.skills)?.contains(filterMap["skills"]!!, ignoreCase = true) == true + } + + if (!hasUsersWithSkills) { + Toast.makeText(activity, getString(R.string.error_filter_not_found), + Toast.LENGTH_SHORT).show() + } + } } memberListInitialized = true tvEmptyList.visibility = View.GONE