Send null queries to ViewModel
This commit is contained in:
@@ -5,6 +5,7 @@ import gq.kirmanak.mealient.database.recipe.entity.FullRecipeEntity
|
||||
import gq.kirmanak.mealient.database.recipe.entity.RecipeSummaryEntity
|
||||
|
||||
interface RecipeRepo {
|
||||
|
||||
fun createPager(): Pager<Int, RecipeSummaryEntity>
|
||||
|
||||
suspend fun clearLocalData()
|
||||
@@ -13,5 +14,5 @@ interface RecipeRepo {
|
||||
|
||||
suspend fun loadRecipeInfo(recipeId: String): FullRecipeEntity?
|
||||
|
||||
fun setSearchName(name: String?)
|
||||
fun updateNameQuery(name: String?)
|
||||
}
|
||||
@@ -56,8 +56,8 @@ class RecipeRepoImpl @Inject constructor(
|
||||
return recipeInfo
|
||||
}
|
||||
|
||||
override fun setSearchName(name: String?) {
|
||||
logger.v { "setSearchName() called with: name = $name" }
|
||||
override fun updateNameQuery(name: String?) {
|
||||
logger.v { "updateNameQuery() called with: name = $name" }
|
||||
pagingSourceFactory.setQuery(name)
|
||||
invalidatingPagingSourceFactory.invalidate()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user