Fix accidental onError on a asFlow

This commit is contained in:
Syer10
2022-11-05 12:09:20 -04:00
parent 8beed83552
commit 50e9cb0996

View File

@@ -22,7 +22,7 @@ class GetCategories @Inject constructor(private val categoryRepository: Category
}
.singleOrNull()
fun asFlow(dropDefault: Boolean = false, onError: suspend (Throwable) -> Unit = {}) = categoryRepository.getCategories()
fun asFlow(dropDefault: Boolean = false) = categoryRepository.getCategories()
.map { categories ->
if (dropDefault) {
categories.filterNot { it.name.equals("default", true) }