From 11cf420320628891595d4708c8d9b664109cab00 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Sat, 3 Dec 2022 12:16:37 +0100 Subject: [PATCH] fix crash when trying to add account to list from profile (#2972) --- .../java/com/keylesspalace/tusky/di/ViewModelFactory.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/di/ViewModelFactory.kt b/app/src/main/java/com/keylesspalace/tusky/di/ViewModelFactory.kt index fe94b45d9..726bb09b6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/di/ViewModelFactory.kt +++ b/app/src/main/java/com/keylesspalace/tusky/di/ViewModelFactory.kt @@ -5,6 +5,7 @@ package com.keylesspalace.tusky.di import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.keylesspalace.tusky.components.account.AccountViewModel +import com.keylesspalace.tusky.components.account.list.ListsForAccountViewModel import com.keylesspalace.tusky.components.account.media.AccountMediaViewModel import com.keylesspalace.tusky.components.announcements.AnnouncementsViewModel import com.keylesspalace.tusky.components.compose.ComposeViewModel @@ -132,5 +133,10 @@ abstract class ViewModelModule { @ViewModelKey(FollowedTagsViewModel::class) internal abstract fun followedTagsViewModel(viewModel: FollowedTagsViewModel): ViewModel + @Binds + @IntoMap + @ViewModelKey(ListsForAccountViewModel::class) + internal abstract fun listsForAccountViewModel(viewModel: ListsForAccountViewModel): ViewModel + // Add more ViewModels here }