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

Commit fb48a70e authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

issue_5413_2 [WIP]: Implement getCategoriesListOSS() in view model

parent 02e846a5
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -59,4 +59,16 @@ class SearchViewModel @Inject constructor(
            }
        }
    }

    /*
     * Get cleanapk search results only.
     * Issue: https://gitlab.e.foundation/e/backlog/-/issues/5413 [2]
     */
    fun getSearchResultsOSS(query: String, lifecycleOwner: LifecycleOwner) {
        viewModelScope.launch(Dispatchers.Main) {
            fusedAPIRepository.getSearchResultsOSS(query).observe(lifecycleOwner) {
                searchResult.postValue(it)
            }
        }
    }
}