From 5c68c8ece8ab36734db7cabeb722fa05ca7f2739 Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Sat, 23 Jul 2022 13:52:56 +0530 Subject: [PATCH] Update Lifecycle to 2.5.1. --- app/build.gradle | 6 +++--- .../java/org/schabi/newpipe/local/feed/FeedViewModel.kt | 2 +- .../local/subscription/dialog/FeedGroupDialogViewModel.kt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0585120ce..c4a9aa1ee 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -97,7 +97,7 @@ android { ext { checkstyleVersion = '10.3.1' - androidxLifecycleVersion = '2.3.1' + androidxLifecycleVersion = '2.5.1' androidxRoomVersion = '2.4.2' androidxWorkVersion = '2.7.1' @@ -203,8 +203,8 @@ dependencies { implementation 'androidx.core:core-ktx:1.8.0' implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.fragment:fragment-ktx:1.3.6' - implementation "androidx.lifecycle:lifecycle-livedata:${androidxLifecycleVersion}" - implementation "androidx.lifecycle:lifecycle-viewmodel:${androidxLifecycleVersion}" + implementation "androidx.lifecycle:lifecycle-livedata-ktx:${androidxLifecycleVersion}" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${androidxLifecycleVersion}" implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0' implementation 'androidx.media:media:1.6.0' implementation 'androidx.preference:preference:1.2.0' diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt index 7f5ef4301..fd8c5f5de 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt @@ -146,7 +146,7 @@ class FeedViewModel( private val groupId: Long = FeedGroupEntity.GROUP_ALL_ID ) : ViewModelProvider.Factory { @Suppress("UNCHECKED_CAST") - override fun create(modelClass: Class): T { + override fun create(modelClass: Class): T { return FeedViewModel( context.applicationContext, groupId, diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialogViewModel.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialogViewModel.kt index 54ba1c6dc..dfdb2b47a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialogViewModel.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialogViewModel.kt @@ -122,7 +122,7 @@ class FeedGroupDialogViewModel( private val initialShowOnlyUngrouped: Boolean = false ) : ViewModelProvider.Factory { @Suppress("UNCHECKED_CAST") - override fun create(modelClass: Class): T { + override fun create(modelClass: Class): T { return FeedGroupDialogViewModel( context.applicationContext, groupId, initialQuery, initialShowOnlyUngrouped