Feed invalidation is necessary for lists
This commit is contained in:
@@ -60,6 +60,8 @@ fun HomeScreen(
|
||||
HomeNewThreadFeedFilter.account = account
|
||||
HomeConversationsFeedFilter.account = account
|
||||
NostrHomeDataSource.invalidateFilters()
|
||||
homeFeedViewModel.invalidateData(true)
|
||||
repliesFeedViewModel.invalidateData(true)
|
||||
}
|
||||
|
||||
if (wantsToAddNip47 != null) {
|
||||
|
||||
+11
-10
@@ -69,19 +69,10 @@ fun NotificationScreen(
|
||||
val accountState by accountViewModel.accountLiveData.observeAsState()
|
||||
val account = remember(accountState) { accountState?.account } ?: return
|
||||
|
||||
if (scrollToTop) {
|
||||
val scope = rememberCoroutineScope()
|
||||
LaunchedEffect(key1 = Unit) {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
notifFeedViewModel.clear()
|
||||
notifFeedViewModel.invalidateData(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(accountViewModel, account.defaultNotificationFollowList) {
|
||||
NostrAccountDataSource.invalidateFilters()
|
||||
NotificationFeedFilter.account = account
|
||||
notifFeedViewModel.invalidateData(true)
|
||||
}
|
||||
|
||||
val lifeCycleOwner = LocalLifecycleOwner.current
|
||||
@@ -99,6 +90,16 @@ fun NotificationScreen(
|
||||
}
|
||||
}
|
||||
|
||||
if (scrollToTop) {
|
||||
val scope = rememberCoroutineScope()
|
||||
LaunchedEffect(key1 = Unit) {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
notifFeedViewModel.clear()
|
||||
notifFeedViewModel.invalidateData(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column(Modifier.fillMaxHeight()) {
|
||||
Column(
|
||||
modifier = Modifier.padding(vertical = 0.dp)
|
||||
|
||||
@@ -110,20 +110,11 @@ fun VideoScreen(
|
||||
NostrVideoDataSource.account = account
|
||||
VideoFeedFilter.account = account
|
||||
|
||||
if (scrollToTop) {
|
||||
val scope = rememberCoroutineScope()
|
||||
LaunchedEffect(key1 = Unit) {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
NostrVideoDataSource.resetFilters()
|
||||
videoFeedView.invalidateData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(accountViewModel, accountState.value?.account?.defaultStoriesFollowList) {
|
||||
VideoFeedFilter.account = account
|
||||
NostrVideoDataSource.account = account
|
||||
NostrVideoDataSource.resetFilters()
|
||||
videoFeedView.invalidateData()
|
||||
}
|
||||
|
||||
DisposableEffect(accountViewModel) {
|
||||
@@ -146,6 +137,16 @@ fun VideoScreen(
|
||||
}
|
||||
}
|
||||
|
||||
if (scrollToTop) {
|
||||
val scope = rememberCoroutineScope()
|
||||
LaunchedEffect(key1 = Unit) {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
NostrVideoDataSource.resetFilters()
|
||||
videoFeedView.invalidateData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column(Modifier.fillMaxHeight()) {
|
||||
Column(
|
||||
modifier = Modifier.padding(vertical = 0.dp)
|
||||
|
||||
Reference in New Issue
Block a user