Skip to content

Commit 5c68c8e

Browse files
Update Lifecycle to 2.5.1.
1 parent 81c4b82 commit 5c68c8e

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ android {
9797
ext {
9898
checkstyleVersion = '10.3.1'
9999

100-
androidxLifecycleVersion = '2.3.1'
100+
androidxLifecycleVersion = '2.5.1'
101101
androidxRoomVersion = '2.4.2'
102102
androidxWorkVersion = '2.7.1'
103103

@@ -203,8 +203,8 @@ dependencies {
203203
implementation 'androidx.core:core-ktx:1.8.0'
204204
implementation 'androidx.documentfile:documentfile:1.0.1'
205205
implementation 'androidx.fragment:fragment-ktx:1.3.6'
206-
implementation "androidx.lifecycle:lifecycle-livedata:${androidxLifecycleVersion}"
207-
implementation "androidx.lifecycle:lifecycle-viewmodel:${androidxLifecycleVersion}"
206+
implementation "androidx.lifecycle:lifecycle-livedata-ktx:${androidxLifecycleVersion}"
207+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${androidxLifecycleVersion}"
208208
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
209209
implementation 'androidx.media:media:1.6.0'
210210
implementation 'androidx.preference:preference:1.2.0'

app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class FeedViewModel(
146146
private val groupId: Long = FeedGroupEntity.GROUP_ALL_ID
147147
) : ViewModelProvider.Factory {
148148
@Suppress("UNCHECKED_CAST")
149-
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
149+
override fun <T : ViewModel> create(modelClass: Class<T>): T {
150150
return FeedViewModel(
151151
context.applicationContext,
152152
groupId,

app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialogViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class FeedGroupDialogViewModel(
122122
private val initialShowOnlyUngrouped: Boolean = false
123123
) : ViewModelProvider.Factory {
124124
@Suppress("UNCHECKED_CAST")
125-
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
125+
override fun <T : ViewModel> create(modelClass: Class<T>): T {
126126
return FeedGroupDialogViewModel(
127127
context.applicationContext,
128128
groupId, initialQuery, initialShowOnlyUngrouped

0 commit comments

Comments
 (0)