fix: clean up some warnings
This commit is contained in:
parent
ab7bc15573
commit
1b50ffcf11
32 changed files with 50 additions and 301 deletions
|
@ -1,6 +1,5 @@
|
|||
package ani.dantotsu.settings.paging
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
|
@ -38,7 +37,7 @@ import kotlinx.coroutines.isActive
|
|||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
class AnimeExtensionsViewModelFactory(
|
||||
private val animeExtensionManager: AnimeExtensionManager
|
||||
) : ViewModelProvider.Factory {
|
||||
|
@ -49,7 +48,7 @@ class AnimeExtensionsViewModelFactory(
|
|||
|
||||
|
||||
class AnimeExtensionsViewModel(
|
||||
private val animeExtensionManager: AnimeExtensionManager
|
||||
animeExtensionManager: AnimeExtensionManager
|
||||
) : ViewModel() {
|
||||
private val searchQuery = MutableStateFlow("")
|
||||
private var currentPagingSource: AnimeExtensionPagingSource? = null
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package ani.dantotsu.settings.paging
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
|
@ -38,6 +37,7 @@ import kotlinx.coroutines.isActive
|
|||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
class MangaExtensionsViewModelFactory(
|
||||
private val mangaExtensionManager: MangaExtensionManager
|
||||
) : ViewModelProvider.Factory {
|
||||
|
@ -47,7 +47,7 @@ class MangaExtensionsViewModelFactory(
|
|||
}
|
||||
|
||||
class MangaExtensionsViewModel(
|
||||
private val mangaExtensionManager: MangaExtensionManager
|
||||
mangaExtensionManager: MangaExtensionManager
|
||||
) : ViewModel() {
|
||||
private val searchQuery = MutableStateFlow("")
|
||||
private var currentPagingSource: MangaExtensionPagingSource? = null
|
||||
|
|
|
@ -97,7 +97,6 @@ class NovelExtensionPagingSource(
|
|||
val availableExtensions =
|
||||
availableExtensionsFlow.filterNot { it.pkgName in installedExtensions }
|
||||
val query = searchQuery
|
||||
val isNsfwEnabled: Boolean = PrefManager.getVal(PrefName.NSFWExtension)
|
||||
val filteredExtensions = if (query.isEmpty()) {
|
||||
availableExtensions
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue