Preserves invalidations of DataSources for Home, Videos and Notifications
This commit is contained in:
@@ -59,6 +59,7 @@ fun HomeScreen(
|
||||
LaunchedEffect(accountViewModel, account.defaultHomeFollowList) {
|
||||
HomeNewThreadFeedFilter.account = account
|
||||
HomeConversationsFeedFilter.account = account
|
||||
NostrHomeDataSource.invalidateFilters()
|
||||
}
|
||||
|
||||
if (wantsToAddNip47 != null) {
|
||||
@@ -71,6 +72,7 @@ fun HomeScreen(
|
||||
if (event == Lifecycle.Event.ON_RESUME) {
|
||||
HomeNewThreadFeedFilter.account = account
|
||||
HomeConversationsFeedFilter.account = account
|
||||
NostrHomeDataSource.invalidateFilters()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +86,7 @@ fun HomeScreen(
|
||||
val scope = rememberCoroutineScope()
|
||||
LaunchedEffect(key1 = Unit) {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
NostrHomeDataSource.resetFilters()
|
||||
NostrHomeDataSource.invalidateFilters()
|
||||
homeFeedViewModel.invalidateData(true)
|
||||
repliesFeedViewModel.invalidateData(true)
|
||||
}
|
||||
|
||||
+3
-3
@@ -70,8 +70,8 @@ fun NotificationScreen(
|
||||
notifFeedViewModel.clear()
|
||||
}
|
||||
|
||||
LaunchedEffect(account.userProfile().pubkeyHex, account.defaultNotificationFollowList) {
|
||||
NostrAccountDataSource.resetFilters()
|
||||
LaunchedEffect(accountViewModel, account.defaultNotificationFollowList) {
|
||||
NostrAccountDataSource.invalidateFilters()
|
||||
NotificationFeedFilter.account = account
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ fun NotificationScreen(
|
||||
DisposableEffect(accountViewModel) {
|
||||
val observer = LifecycleEventObserver { _, event ->
|
||||
if (event == Lifecycle.Event.ON_RESUME) {
|
||||
NostrAccountDataSource.invalidateFilters()
|
||||
NotificationFeedFilter.account = account
|
||||
notifFeedViewModel.invalidateData(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ fun VideoScreen(
|
||||
LaunchedEffect(accountViewModel, accountState.value?.account?.defaultStoriesFollowList) {
|
||||
VideoFeedFilter.account = account
|
||||
NostrVideoDataSource.account = account
|
||||
NostrVideoDataSource.resetFilters()
|
||||
}
|
||||
|
||||
DisposableEffect(accountViewModel) {
|
||||
|
||||
Reference in New Issue
Block a user