Eric/profile feeds list (#2049)

* Fix profile feedgens view

* Fix profile lists view

* Translate
zio/stable
Eric Bailey 2023-11-30 15:40:49 -06:00 committed by GitHub
parent 47b0d36b73
commit 76a3c66f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 26 additions and 20 deletions

File diff suppressed because one or more lines are too long

View File

@ -2182,6 +2182,9 @@ msgid "You have blocked the author or you have been blocked by the author."
msgstr "" msgstr ""
#: src/view/com/feeds/ProfileFeedgens.tsx:150 #: src/view/com/feeds/ProfileFeedgens.tsx:150
msgid "You have no feeds."
msgstr ""
#: src/view/com/lists/MyLists.tsx:88 #: src/view/com/lists/MyLists.tsx:88
#: src/view/com/lists/ProfileLists.tsx:154 #: src/view/com/lists/ProfileLists.tsx:154
msgid "You have no lists." msgid "You have no lists."

File diff suppressed because one or more lines are too long

View File

@ -2182,6 +2182,9 @@ msgid "You have blocked the author or you have been blocked by the author."
msgstr "" msgstr ""
#: src/view/com/feeds/ProfileFeedgens.tsx:150 #: src/view/com/feeds/ProfileFeedgens.tsx:150
msgid "You have no feeds."
msgstr ""
#: src/view/com/lists/MyLists.tsx:88 #: src/view/com/lists/MyLists.tsx:88
#: src/view/com/lists/ProfileLists.tsx:154 #: src/view/com/lists/ProfileLists.tsx:154
msgid "You have no lists." msgid "You have no lists."

File diff suppressed because one or more lines are too long

View File

@ -2182,6 +2182,9 @@ msgid "You have blocked the author or you have been blocked by the author."
msgstr "" msgstr ""
#: src/view/com/feeds/ProfileFeedgens.tsx:150 #: src/view/com/feeds/ProfileFeedgens.tsx:150
msgid "You have no feeds."
msgstr ""
#: src/view/com/lists/MyLists.tsx:88 #: src/view/com/lists/MyLists.tsx:88
#: src/view/com/lists/ProfileLists.tsx:154 #: src/view/com/lists/ProfileLists.tsx:154
msgid "You have no lists." msgid "You have no lists."

File diff suppressed because one or more lines are too long

View File

@ -2182,6 +2182,9 @@ msgid "You have blocked the author or you have been blocked by the author."
msgstr "" msgstr ""
#: src/view/com/feeds/ProfileFeedgens.tsx:150 #: src/view/com/feeds/ProfileFeedgens.tsx:150
msgid "You have no feeds."
msgstr ""
#: src/view/com/lists/MyLists.tsx:88 #: src/view/com/lists/MyLists.tsx:88
#: src/view/com/lists/ProfileLists.tsx:154 #: src/view/com/lists/ProfileLists.tsx:154
msgid "You have no lists." msgid "You have no lists."

File diff suppressed because one or more lines are too long

View File

@ -2174,6 +2174,9 @@ msgid "You have blocked the author or you have been blocked by the author."
msgstr "आपने लेखक को अवरुद्ध किया है या आपने लेखक द्वारा अवरुद्ध किया है।।" msgstr "आपने लेखक को अवरुद्ध किया है या आपने लेखक द्वारा अवरुद्ध किया है।।"
#: src/view/com/feeds/ProfileFeedgens.tsx:150 #: src/view/com/feeds/ProfileFeedgens.tsx:150
msgid "You have no feeds."
msgstr ""
#: src/view/com/lists/MyLists.tsx:88 #: src/view/com/lists/MyLists.tsx:88
#: src/view/com/lists/ProfileLists.tsx:154 #: src/view/com/lists/ProfileLists.tsx:154
msgid "You have no lists." msgid "You have no lists."

View File

@ -1,6 +1,5 @@
import React, {MutableRefObject} from 'react' import React, {MutableRefObject} from 'react'
import { import {
ActivityIndicator,
Dimensions, Dimensions,
RefreshControl, RefreshControl,
StyleProp, StyleProp,
@ -24,6 +23,7 @@ import {useAnimatedScrollHandler} from 'react-native-reanimated'
import {useTheme} from '#/lib/ThemeContext' import {useTheme} from '#/lib/ThemeContext'
import {usePreferencesQuery} from '#/state/queries/preferences' import {usePreferencesQuery} from '#/state/queries/preferences'
import {hydrateFeedGenerator} from '#/state/queries/feed' import {hydrateFeedGenerator} from '#/state/queries/feed'
import {FeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
const LOADING = {_reactKey: '__loading__'} const LOADING = {_reactKey: '__loading__'}
const EMPTY = {_reactKey: '__empty__'} const EMPTY = {_reactKey: '__empty__'}
@ -147,7 +147,7 @@ export const ProfileFeedgens = React.forwardRef<
testID="listsEmpty" testID="listsEmpty"
style={[{padding: 18, borderTopWidth: 1}, pal.border]}> style={[{padding: 18, borderTopWidth: 1}, pal.border]}>
<Text style={pal.textLight}> <Text style={pal.textLight}>
<Trans>You have no lists.</Trans> <Trans>You have no feeds.</Trans>
</Text> </Text>
</View> </View>
) )
@ -163,11 +163,7 @@ export const ProfileFeedgens = React.forwardRef<
/> />
) )
} else if (item === LOADING) { } else if (item === LOADING) {
return ( return <FeedLoadingPlaceholder />
<View style={{padding: 20}}>
<ActivityIndicator />
</View>
)
} }
if (preferences) { if (preferences) {
return ( return (
@ -175,6 +171,7 @@ export const ProfileFeedgens = React.forwardRef<
feed={item} feed={item}
preferences={preferences} preferences={preferences}
style={styles.item} style={styles.item}
showLikes
/> />
) )
} }
@ -221,6 +218,5 @@ export const ProfileFeedgens = React.forwardRef<
const styles = StyleSheet.create({ const styles = StyleSheet.create({
item: { item: {
paddingHorizontal: 18, paddingHorizontal: 18,
paddingVertical: 4,
}, },
}) })

View File

@ -1,6 +1,5 @@
import React, {MutableRefObject} from 'react' import React, {MutableRefObject} from 'react'
import { import {
ActivityIndicator,
Dimensions, Dimensions,
RefreshControl, RefreshControl,
StyleProp, StyleProp,
@ -23,6 +22,7 @@ import {Trans} from '@lingui/macro'
import {cleanError} from '#/lib/strings/errors' import {cleanError} from '#/lib/strings/errors'
import {useAnimatedScrollHandler} from 'react-native-reanimated' import {useAnimatedScrollHandler} from 'react-native-reanimated'
import {useTheme} from '#/lib/ThemeContext' import {useTheme} from '#/lib/ThemeContext'
import {FeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
const LOADING = {_reactKey: '__loading__'} const LOADING = {_reactKey: '__loading__'}
const EMPTY = {_reactKey: '__empty__'} const EMPTY = {_reactKey: '__empty__'}
@ -170,11 +170,7 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>(
/> />
) )
} else if (item === LOADING) { } else if (item === LOADING) {
return ( return <FeedLoadingPlaceholder />
<View style={{padding: 20}}>
<ActivityIndicator />
</View>
)
} }
return ( return (
<ListCard <ListCard
@ -226,6 +222,5 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>(
const styles = StyleSheet.create({ const styles = StyleSheet.create({
item: { item: {
paddingHorizontal: 18, paddingHorizontal: 18,
paddingVertical: 4,
}, },
}) })