diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-04-27 12:38:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 12:38:23 -0500 |
commit | 1d50ddb378d5c6954d4cf8a6145b4486b9497107 (patch) | |
tree | 85a55e9aef6692c304cc31d7c3bb239c186f7951 /src/view/com/discover/SuggestedPosts.tsx | |
parent | 51be8474db5e8074b1af233609b5eb455af31692 (diff) | |
download | voidsky-1d50ddb378d5c6954d4cf8a6145b4486b9497107.tar.zst |
Refactor moderation to apply to accounts, profiles, and posts correctly (#548)
* Add ScreenHider component * Add blur attribute to UserAvatar and UserBanner * Remove dead suggested posts component and model * Bump @atproto/api@0.2.10 * Rework moderation tooling to give a more precise DSL * Add label mocks * Apply finer grained moderation controls * Refactor ProfileCard to just take the profile object * Apply moderation to user listings and banner * Apply moderation to notifications * Fix lint * Tune avatar & banner blur settings per platform * 1.24
Diffstat (limited to 'src/view/com/discover/SuggestedPosts.tsx')
-rw-r--r-- | src/view/com/discover/SuggestedPosts.tsx | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/view/com/discover/SuggestedPosts.tsx b/src/view/com/discover/SuggestedPosts.tsx deleted file mode 100644 index 6d2f39636..000000000 --- a/src/view/com/discover/SuggestedPosts.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react' -import {ActivityIndicator, StyleSheet, View} from 'react-native' -import {observer} from 'mobx-react-lite' -import {useStores} from 'state/index' -import {SuggestedPostsModel} from 'state/models/discovery/suggested-posts' -import {s} from 'lib/styles' -import {FeedItem as Post} from '../posts/FeedItem' -import {Text} from '../util/text/Text' -import {usePalette} from 'lib/hooks/usePalette' - -export const SuggestedPosts = observer(() => { - const pal = usePalette('default') - const store = useStores() - const suggestedPostsView = React.useMemo<SuggestedPostsModel>( - () => new SuggestedPostsModel(store), - [store], - ) - - React.useEffect(() => { - if (!suggestedPostsView.hasLoaded) { - suggestedPostsView.setup() - } - }, [store, suggestedPostsView]) - - return ( - <> - {(suggestedPostsView.hasContent || suggestedPostsView.isLoading) && ( - <Text type="title" style={[styles.heading, pal.text]}> - Recently, on Bluesky... - </Text> - )} - {suggestedPostsView.hasContent && ( - <> - <View style={[pal.border, styles.bottomBorder]}> - {suggestedPostsView.posts.map(item => ( - <Post item={item} key={item._reactKey} showFollowBtn /> - ))} - </View> - </> - )} - {suggestedPostsView.isLoading && ( - <View style={s.mt10}> - <ActivityIndicator /> - </View> - )} - </> - ) -}) - -const styles = StyleSheet.create({ - heading: { - fontWeight: 'bold', - paddingHorizontal: 12, - paddingTop: 16, - paddingBottom: 8, - }, - - bottomBorder: { - borderBottomWidth: 1, - }, - - loadMore: { - paddingLeft: 12, - paddingVertical: 10, - }, -}) |