|
|
|
|
@ -4,8 +4,8 @@ import android.annotation.SuppressLint
|
|
|
|
|
import android.app.SearchManager
|
|
|
|
|
import android.content.Context
|
|
|
|
|
import android.provider.SearchRecentSuggestions
|
|
|
|
|
import dagger.Reusable
|
|
|
|
|
import dagger.hilt.android.qualifiers.ApplicationContext
|
|
|
|
|
import javax.inject.Inject
|
|
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
|
|
import kotlinx.coroutines.currentCoroutineContext
|
|
|
|
|
import kotlinx.coroutines.flow.*
|
|
|
|
|
@ -22,9 +22,9 @@ import org.koitharu.kotatsu.parsers.model.MangaTag
|
|
|
|
|
import org.koitharu.kotatsu.parsers.util.levenshteinDistance
|
|
|
|
|
import org.koitharu.kotatsu.search.ui.MangaSuggestionsProvider
|
|
|
|
|
import org.koitharu.kotatsu.utils.ext.runCatchingCancellable
|
|
|
|
|
import javax.inject.Singleton
|
|
|
|
|
import javax.inject.Inject
|
|
|
|
|
|
|
|
|
|
@Singleton
|
|
|
|
|
@Reusable
|
|
|
|
|
class MangaSearchRepository @Inject constructor(
|
|
|
|
|
private val settings: AppSettings,
|
|
|
|
|
private val db: MangaDatabase,
|
|
|
|
|
|