Decrease debounce time for library search

Async library search code cleanup
Rename LoadingTools -> LoaderManager
This commit is contained in:
NerdNumber9
2019-04-12 12:16:52 -04:00
parent 6f2ff6a77e
commit 9b3579acf6
4 changed files with 18 additions and 5 deletions

View File

@ -0,0 +1,12 @@
package exh.util
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.onEach
import kotlin.coroutines.coroutineContext
@FlowPreview
fun <T> Flow<T>.cancellable() = onEach {
coroutineContext.ensureActive()
}