Mentorship-android: Search feature is not working

Created on 23 Feb 2020  路  6Comments  路  Source: anitab-org/mentorship-android

Describe the bug
After merging all GCI search feature is not working as expected

To Reproduce
Steps to reproduce the behavior:

  1. Go to members
  2. Click on search icon
  3. Type in username which exists
  4. See the list is empty
  5. Press cross to cancel search
    6 See list is not reverted

Expected behavior
Search shows existing users by username or name

Screenshots

| Screenshot 2020-02-23 at 20 12 16 | Screenshot 2020-02-23 at 20 12 29 | Screenshot 2020-02-23 at 20 12 41 |
|---|---|---|

Coding On Hold Bug

All 6 comments

Hey @annabauza @isabelcosta! Can I work on this issue?

@sidvenu
You can work on this issue. Before sending the PR can you tell what has gone wrong and why the search isn't working.

I'm still working on this issue - it took me some time to set up the local server. Trying to find the issue now.

Just a status update - I was caught up with quite a lot of work the past few days, I'll be done with the issue by this weekend.

Cool @sidvenu ! thank you so much for the update :)

MembersAdapter has a userList and a filteredUserList. The filteredUserList is what is shown to the user.

When a search term is entered, an object of MembersAdapter class is created. But, whenever MembersAdapter is created, the userList is set in the object, but filteredUserList is empty (filteredUserList = mutableListOf<User>()). So, only an empty list is used to show the members to the user, thus the search feature wouldn't work.

There are different approaches to solve this, and I've made the changes in such a way it doesn't affect other features of the app. I'll submit a PR for the same.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mohak1283 picture mohak1283  路  9Comments

isabelcosta picture isabelcosta  路  6Comments

annabauza picture annabauza  路  7Comments

iofall picture iofall  路  7Comments

isabelcosta picture isabelcosta  路  4Comments