diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-04 17:54:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 17:54:39 -0800 |
commit | 74e0b73db58596b60fa051c6dd86f8029880afff (patch) | |
tree | 96503db76ff5d1e0b6a0b0245e818bc117188d7c | |
parent | d07ea64434709f1ce43bde3d6e45ca4dc99b0733 (diff) | |
download | voidsky-74e0b73db58596b60fa051c6dd86f8029880afff.tar.zst |
Add back ignore-filters-for behaviors (#2086)
-rw-r--r-- | src/view/com/posts/Feed.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/Profile.tsx | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/view/com/posts/Feed.tsx b/src/view/com/posts/Feed.tsx index b9ca9abdc..ed00561ba 100644 --- a/src/view/com/posts/Feed.tsx +++ b/src/view/com/posts/Feed.tsx @@ -36,6 +36,7 @@ const LOAD_MORE_ERROR_ITEM = {_reactKey: '__load_more_error__'} let Feed = ({ feed, feedParams, + ignoreFilterFor, style, enabled, pollInterval, @@ -53,6 +54,7 @@ let Feed = ({ }: { feed: FeedDescriptor feedParams?: FeedParams + ignoreFilterFor?: string style?: StyleProp<ViewStyle> enabled?: boolean pollInterval?: number @@ -202,6 +204,7 @@ let Feed = ({ slice={item} // we check for this before creating the feedItems array moderationOpts={moderationOpts!} + ignoreFilterFor={ignoreFilterFor} /> ) }, @@ -212,6 +215,7 @@ let Feed = ({ onPressRetryLoadMore, renderEmptyState, moderationOpts, + ignoreFilterFor, ], ) diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index ea19515b5..596350564 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -287,6 +287,7 @@ function ProfileScreenLoaded({ scrollElRef={ scrollElRef as React.MutableRefObject<FlatList<any> | null> } + ignoreFilterFor={profile.did} /> )} {showRepliesTab @@ -307,6 +308,7 @@ function ProfileScreenLoaded({ scrollElRef={ scrollElRef as React.MutableRefObject<FlatList<any> | null> } + ignoreFilterFor={profile.did} /> ) : null} @@ -321,6 +323,7 @@ function ProfileScreenLoaded({ scrollElRef={ scrollElRef as React.MutableRefObject<FlatList<any> | null> } + ignoreFilterFor={profile.did} /> )} {showLikesTab @@ -341,6 +344,7 @@ function ProfileScreenLoaded({ scrollElRef={ scrollElRef as React.MutableRefObject<FlatList<any> | null> } + ignoreFilterFor={profile.did} /> ) : null} @@ -396,10 +400,19 @@ interface FeedSectionProps { isFocused: boolean isScrolledDown: boolean scrollElRef: React.MutableRefObject<FlatList<any> | null> + ignoreFilterFor?: string } const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>( function FeedSectionImpl( - {feed, onScroll, headerHeight, isFocused, isScrolledDown, scrollElRef}, + { + feed, + onScroll, + headerHeight, + isFocused, + isScrolledDown, + scrollElRef, + ignoreFilterFor, + }, ref, ) { const queryClient = useQueryClient() @@ -432,6 +445,7 @@ const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>( renderEmptyState={renderPostsEmpty} headerOffset={headerHeight} renderEndOfFeed={ProfileEndOfFeed} + ignoreFilterFor={ignoreFilterFor} /> {(isScrolledDown || hasNew) && ( <LoadLatestBtn |