-
Notifications
You must be signed in to change notification settings - Fork 514
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#3146 : Create a generic utility for filtering enums #5529
base: develop
Are you sure you want to change the base?
Conversation
…ring enums . I have changed the following files UserTypeitemsViewModel , PerformancemetricsController and TopicLessonsFragmentPresenter.The function i made is filterByEnumCondition - This function is used to filter thelist of items based on the enum condition.
Please help me to make this PR work and review my changes. |
Hi @whyash8, please make sure you have signed the CLA here - Individual CLA. |
I have signed the CLA !please help me to proceed further . thanks |
Hi @whyash8, bazel tests are failing most likely because the new utility should be added as a dependency in app/BUILD.bazel. To see the test failures, please read https://github.com/oppia/oppia-android/wiki/Static-Analysis-Checks#developer-video---understanding-ci-check-failures. To fix the dependency problem, please look at the bazel file changes here for example: https://github.com/oppia/oppia-android/pull/5446/files |
I am building my oppia-android bazel in my ubuntu and i am getting this issue !! please help me to resolve it |
@theMr17, PTAL. |
@whyash8 This issue has been encountered before. Please refer to the latter part of the comment for more details: #4886 (comment). |
Hi @whyash8, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
I have successfully build the bazel . But due to my university exams i will be able to continue after 3 days. Sorry for the inactivity. |
Hi @whyash8, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
I am working on it! |
This PR introduces a new utility function filterByEnumCondition to standardize filtering of enums across various parts of the oppia-android codebase. This utility function allows filtering of collections based on a condition applied to enum values.
Explanation
This PR introduces a new utility function filterByEnumCondition to standardize filtering of enums across various parts of the oppia-android codebase. This utility function allows filtering of collections based on a condition applied to enum values.
Key Changes:
Added Utility Function:
filterByEnumCondition: A generic function to filter a collection based on a condition applied to an enum extracted from each item in the collection.
Updated Existing Code:
Refactored code in getLeastRecentMetricLogIndex, getLeastRecentMediumPriorityEventIndex, and other methods to utilize the new filterByEnumCondition function.
Updated the calculation of completedChapterCount and inProgressChapterCount using the new utility function.
##Testing : Please help me to test the changes i have made . I have problems regarding that .
Essential Checklist