Feat: Implement player search tab and navigation to player details
This commit enables the player search functionality within the general search feature. It introduces a new data model for current team tracking, implements the necessary API calls to fetch player-team associations, and enables navigation from search results to the player details screen.
- **New Data Model**: Added `PersonCurrentTeamModel.kt` to handle current team information for players, including IDs, names, logos, and social media links.
- **API Integration**:
- Added `GET_PERSON_CURRENT_TEAM` endpoint to `EndPoints.kt`.
- Implemented `getPersonCurrentTeam` in `FeaturesApi.kt` and `FeatureRepository.kt`.
- **Search UI & Logic**:
- **`SearchFragment.kt` & `SearchViewModel.kt`**: Un-commented and enabled the "Player" tab in the global search view pager and menu list.
- **`PlayerSearchFragment.kt`**:
- Updated to observe the shared search query and trigger `getPlayerList`.
- Implemented result clearing logic when the query is empty.
- Added logic to fetch a player's current team upon selection before navigating to the details screen.
- **`PlayerSearchViewModel.kt`**:
- Added `getPersonCurrentTeam` network call and state management.
- Implemented `clearResults()` and `resetPersonCurrentTeamState()` to manage API states.
- **`PlayerSearchAdapter.kt`**: Initialized `onItemClick` to handle item selection.
- **Models**: Updated `PersonModel.kt` to use `nationalityCode` instead of `nationalityCodeIoc` for retrieving country flags.
- **Layouts**: Updated `fragment_play_search.xml` to use the specific `PlayerSearchViewModel` instead of the generic `SearchViewModel`.
LOADLY.IOTips.
1. This application comes from a third-party product and its content is not controlled by LOADLY, so please screen it carefully and install it with caution. LOADLY internal testing service platform provides application testing hosting and application crash detection services for third-party applications. LOADLY only provides internal testing support for third-party applications, and does not involve any manual editing or collation, nor does it participate in the content development or external operation of any application, and does not have any affiliation with third-party applications, and does not provide any guarantee or commitment.
2. Please check the quality of applications carefully, and do not install applications from unreliable sources because of spam, emails, text descriptions, etc. Please make your own judgement and install trusted applications based on the source of the application installation link. LOADLY is not responsible for the rules, policies, or specific content of applications published through LOADLY or links to other sites displayed on LOADLY. LOADLY shall not be liable for any investment or purchase made as a result, click here to see more.
Tips.
1. This application comes from a third-party product and its content is not controlled by LOADLY, so please screen it carefully and install it with caution. LOADLY internal testing service platform provides application testing hosting and application crash detection services for third-party applications. LOADLY only provides internal testing support for third-party applications, and does not involve any manual editing or collation, nor does it participate in the content development or external operation of any application, and does not have any affiliation with third-party applications, and does not provide any guarantee or commitment.
2. Please check the quality of applications carefully, and do not install applications from unreliable sources because of spam, emails, text descriptions, etc. Please make your own judgement and install trusted applications based on the source of the application installation link. LOADLY is not responsible for the rules, policies, or specific content of applications published through LOADLY or links to other sites displayed on LOADLY. LOADLY shall not be liable for any investment or purchase made as a result, click here to see more.