Refactor NostrUserFollowSetFeedViewModel to use the FollowSetViewModel. Change follow sets signature. Might be changed later.

This commit is contained in:
KotlinGeekDev
2024-10-31 16:52:34 +01:00
parent f3edc2d43b
commit 63654b742a
2 changed files with 3 additions and 4 deletions
@@ -45,8 +45,6 @@ import com.vitorpamplona.quartz.events.MetadataEvent
import com.vitorpamplona.quartz.events.ReportEvent
import com.vitorpamplona.quartz.events.UserMetadata
import com.vitorpamplona.quartz.events.toImmutableListOfLists
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.persistentSetOf
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
@@ -62,7 +60,7 @@ class User(
var latestMetadataRelay: String? = null
var latestContactList: ContactListEvent? = null
var latestBookmarkList: BookmarkListEvent? = null
var followSets: ImmutableList<AddressableNote> = persistentListOf()
val followSets: MutableList<AddressableNote> = mutableListOf()
var reports = mapOf<User, Set<Note>>()
private set
@@ -51,6 +51,7 @@ import com.vitorpamplona.amethyst.ui.dal.UserProfileNewThreadFeedFilter
import com.vitorpamplona.amethyst.ui.dal.UserProfileReportsFeedFilter
import com.vitorpamplona.amethyst.ui.feeds.FeedContentState
import com.vitorpamplona.amethyst.ui.feeds.InvalidatableContent
import com.vitorpamplona.amethyst.ui.screen.loggedIn.lists.FollowSetFeedViewModel
import com.vitorpamplona.quartz.events.ChatroomKey
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
@@ -218,7 +219,7 @@ class NostrBookmarkPrivateFeedViewModel(
class NostrUserFollowSetFeedViewModel(
val account: Account,
) : FeedViewModel(FollowSetFeedFilter(account)) {
) : FollowSetFeedViewModel(FollowSetFeedFilter(account)) {
class Factory(
val account: Account,
) : ViewModelProvider.Factory {