1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-10 12:00:03 +00:00

Update Lifecycle to 2.5.1.

This commit is contained in:
Isira Seneviratne 2022-07-23 13:52:56 +05:30
parent 81c4b822e0
commit 5c68c8ece8
3 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ android {
ext { ext {
checkstyleVersion = '10.3.1' checkstyleVersion = '10.3.1'
androidxLifecycleVersion = '2.3.1' androidxLifecycleVersion = '2.5.1'
androidxRoomVersion = '2.4.2' androidxRoomVersion = '2.4.2'
androidxWorkVersion = '2.7.1' androidxWorkVersion = '2.7.1'
@ -203,8 +203,8 @@ dependencies {
implementation 'androidx.core:core-ktx:1.8.0' implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.fragment:fragment-ktx:1.3.6' implementation 'androidx.fragment:fragment-ktx:1.3.6'
implementation "androidx.lifecycle:lifecycle-livedata:${androidxLifecycleVersion}" implementation "androidx.lifecycle:lifecycle-livedata-ktx:${androidxLifecycleVersion}"
implementation "androidx.lifecycle:lifecycle-viewmodel:${androidxLifecycleVersion}" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${androidxLifecycleVersion}"
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
implementation 'androidx.media:media:1.6.0' implementation 'androidx.media:media:1.6.0'
implementation 'androidx.preference:preference:1.2.0' implementation 'androidx.preference:preference:1.2.0'

View File

@ -146,7 +146,7 @@ class FeedViewModel(
private val groupId: Long = FeedGroupEntity.GROUP_ALL_ID private val groupId: Long = FeedGroupEntity.GROUP_ALL_ID
) : ViewModelProvider.Factory { ) : ViewModelProvider.Factory {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
override fun <T : ViewModel?> create(modelClass: Class<T>): T { override fun <T : ViewModel> create(modelClass: Class<T>): T {
return FeedViewModel( return FeedViewModel(
context.applicationContext, context.applicationContext,
groupId, groupId,

View File

@ -122,7 +122,7 @@ class FeedGroupDialogViewModel(
private val initialShowOnlyUngrouped: Boolean = false private val initialShowOnlyUngrouped: Boolean = false
) : ViewModelProvider.Factory { ) : ViewModelProvider.Factory {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
override fun <T : ViewModel?> create(modelClass: Class<T>): T { override fun <T : ViewModel> create(modelClass: Class<T>): T {
return FeedGroupDialogViewModel( return FeedGroupDialogViewModel(
context.applicationContext, context.applicationContext,
groupId, initialQuery, initialShowOnlyUngrouped groupId, initialQuery, initialShowOnlyUngrouped