Update AndroidX dependencies
This commit is contained in:
@@ -55,11 +55,9 @@ android {
|
||||
'-opt-in=kotlinx.coroutines.FlowPreview',
|
||||
'-opt-in=kotlin.contracts.ExperimentalContracts',
|
||||
'-opt-in=coil.annotation.ExperimentalCoilApi',
|
||||
'-opt-in=com.google.android.material.badge.ExperimentalBadgeUtils',
|
||||
]
|
||||
}
|
||||
lint {
|
||||
abortOnError false
|
||||
disable 'MissingTranslation', 'PrivateResource', 'NotifyDataSetChanged'
|
||||
}
|
||||
testOptions {
|
||||
@@ -90,20 +88,20 @@ dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.9.0'
|
||||
implementation 'androidx.activity:activity-ktx:1.6.1'
|
||||
implementation 'androidx.fragment:fragment-ktx:1.5.5'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-service:2.5.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-process:2.5.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-service:2.6.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-process:2.6.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.3.0'
|
||||
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
implementation 'androidx.work:work-runtime-ktx:2.8.0'
|
||||
implementation 'androidx.biometric:biometric-ktx:1.2.0-alpha05'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
//noinspection LifecycleAnnotationProcessorWithJava8
|
||||
kapt 'androidx.lifecycle:lifecycle-compiler:2.5.1'
|
||||
kapt 'androidx.lifecycle:lifecycle-compiler:2.6.0'
|
||||
|
||||
implementation 'androidx.room:room-runtime:2.5.0'
|
||||
implementation 'androidx.room:room-ktx:2.5.0'
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.koitharu.kotatsu.utils.ext.findActivity
|
||||
|
||||
class ReversibleActionObserver(
|
||||
private val snackbarHost: View,
|
||||
) : Observer<ReversibleAction> {
|
||||
) : Observer<ReversibleAction?> {
|
||||
|
||||
override fun onChanged(action: ReversibleAction?) {
|
||||
if (action == null) {
|
||||
|
||||
@@ -19,7 +19,7 @@ abstract class ErrorObserver(
|
||||
protected val fragment: Fragment?,
|
||||
private val resolver: ExceptionResolver?,
|
||||
private val onResolved: Consumer<Boolean>?,
|
||||
) : Observer<Throwable> {
|
||||
) : Observer<Throwable?> {
|
||||
|
||||
protected val activity = host.context.findActivity()
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ class DetailsActivity :
|
||||
|
||||
private class PrefetchObserver(
|
||||
private val context: Context,
|
||||
) : Observer<List<ChapterListItem>> {
|
||||
) : Observer<List<ChapterListItem>?> {
|
||||
|
||||
private var isCalled = false
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ class PageHolderDelegate(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onChanged(t: ReaderSettings?) {
|
||||
override fun onChanged(t: ReaderSettings) {
|
||||
if (state == State.SHOWN) {
|
||||
callback.onImageShowing(readerSettings)
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.coroutineScope
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import java.io.Serializable
|
||||
import kotlin.coroutines.resume
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
|
||||
inline fun <T : Fragment> T.withArgs(size: Int, block: Bundle.() -> Unit): T {
|
||||
val b = Bundle(size)
|
||||
@@ -48,7 +48,7 @@ fun Fragment.addMenuProvider(provider: MenuProvider) {
|
||||
|
||||
suspend fun Fragment.awaitViewLifecycle(): LifecycleOwner = suspendCancellableCoroutine { cont ->
|
||||
val liveData = viewLifecycleOwnerLiveData
|
||||
val observer = object : Observer<LifecycleOwner> {
|
||||
val observer = object : Observer<LifecycleOwner?> {
|
||||
override fun onChanged(result: LifecycleOwner?) {
|
||||
if (result != null) {
|
||||
liveData.removeObserver(this)
|
||||
|
||||
@@ -12,22 +12,24 @@ import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.viewmodel.CreationExtras
|
||||
|
||||
@Deprecated("Migrate to SavedStateHandle in vm")
|
||||
@MainThread
|
||||
inline fun <reified VM : ViewModel> ComponentActivity.assistedViewModels(
|
||||
noinline viewModelProducer: (SavedStateHandle) -> VM,
|
||||
): Lazy<VM> = viewModels {
|
||||
object : AbstractSavedStateViewModelFactory(this, intent.extras) {
|
||||
object : AbstractSavedStateViewModelFactory(this@assistedViewModels, intent.extras) {
|
||||
override fun <T : ViewModel> create(key: String, modelClass: Class<T>, handle: SavedStateHandle): T {
|
||||
return requireNotNull(modelClass.cast(viewModelProducer(handle)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Migrate to SavedStateHandle in vm")
|
||||
@MainThread
|
||||
inline fun <reified VM : ViewModel> Fragment.assistedViewModels(
|
||||
noinline viewModelProducer: (SavedStateHandle) -> VM,
|
||||
): Lazy<VM> = viewModels {
|
||||
object : AbstractSavedStateViewModelFactory(this, arguments) {
|
||||
object : AbstractSavedStateViewModelFactory(this@assistedViewModels, arguments) {
|
||||
override fun <T : ViewModel> create(key: String, modelClass: Class<T>, handle: SavedStateHandle): T {
|
||||
return requireNotNull(modelClass.cast(viewModelProducer(handle)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user