Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Verified Commit c1d0f655 authored by Fahim M. Choudhury's avatar Fahim M. Choudhury
Browse files

Refactor: simplify search logic

This commit refactors the search functionality by:
- Consolidating `getCleanApkSearchResults` and `getGplaySearchResult` into a single `search` method in `SearchApi` and `SearchApiImpl`.
- Moving the search logic from `SearchViewModel` to `SearchApiImpl`.
- `SearchApiImpl` now directly calls `SearchProvider` methods for searching by package name and keyword.
- Package name searches are now performed only if the query matches a package name pattern.
- Search result fetching in `SearchViewModel` is simplified to a single call to `searchApi.search(query)`.
- Constants for app types (`APP_TYPE_ANY`, `APP_TYPE_OPEN`, `APP_TYPE_PWA`) are moved from `SearchApi` to `ApplicationRepository`.
- Removed unused `coroutineScope` and `async` calls in `SearchApiImpl`.
parent 640853ce
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment