Don't move the feed up when new follow list is updated

This commit is contained in:
Vitor Pamplona 2023-06-17 15:56:46 -04:00
parent fb5fad5d02
commit f0fe2dfc17

View File

@ -140,13 +140,21 @@ fun WatchAccountForHomeScreen(
val accountState by accountViewModel.accountLiveData.observeAsState()
val followState by accountViewModel.account.userProfile().live().follows.observeAsState()
LaunchedEffect(accountViewModel, accountState?.account?.defaultHomeFollowList, followState) {
LaunchedEffect(accountViewModel, accountState?.account?.defaultHomeFollowList) {
launch(Dispatchers.IO) {
NostrHomeDataSource.invalidateFilters()
homeFeedViewModel.invalidateDataAndSendToTop(true)
repliesFeedViewModel.invalidateDataAndSendToTop(true)
}
}
LaunchedEffect(followState) {
launch(Dispatchers.IO) {
NostrHomeDataSource.invalidateFilters()
homeFeedViewModel.invalidateData(true)
repliesFeedViewModel.invalidateData(true)
}
}
}
@Immutable