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`.
Loading
Please register or sign in to comment