diff --git a/frontend/Components/NoteCard/index.tsx b/frontend/Components/NoteCard/index.tsx index b33ed58..fba680c 100644 --- a/frontend/Components/NoteCard/index.tsx +++ b/frontend/Components/NoteCard/index.tsx @@ -164,7 +164,7 @@ export const NoteCard: React.FC = ({ numberOfLines={numberOfLines} /> )} - {showRepostPreview && repost && } + {showRepostPreview && repost && } ) diff --git a/frontend/Components/ProfileData/index.tsx b/frontend/Components/ProfileData/index.tsx index 0691bb6..a4a6e96 100644 --- a/frontend/Components/ProfileData/index.tsx +++ b/frontend/Components/ProfileData/index.tsx @@ -41,7 +41,7 @@ export const ProfileData: React.FC = ({ - {usernamePubKey(username, nPub)} + {usernamePubKey(username, nPub)} {validNip05 ? ( = ({ <> )} - {validNip05 ? {getNip05Domain(nip05)} : <>} - {date ? {date} : <>} + {validNip05 ? {getNip05Domain(nip05)} : <>} + {date ? {date} : <>} ) @@ -64,7 +64,7 @@ const styles = StyleSheet.create({ flexDirection: 'row', }, contactName: { - flexDirection: 'row', + flexDirection: 'row' }, contactData: { flexDirection: 'column', diff --git a/frontend/Pages/ContactsFeed/index.tsx b/frontend/Pages/ContactsFeed/index.tsx index 251164e..8dfa769 100644 --- a/frontend/Pages/ContactsFeed/index.tsx +++ b/frontend/Pages/ContactsFeed/index.tsx @@ -1,5 +1,15 @@ import React, { useContext, useEffect, useState } from 'react' -import { Dimensions, FlatList, ListRenderItem, ScrollView, StyleSheet, View } from 'react-native' +import { + ActivityIndicator, + Dimensions, + FlatList, + ListRenderItem, + NativeScrollEvent, + NativeSyntheticEvent, + ScrollView, + StyleSheet, + View, +} from 'react-native' import Clipboard from '@react-native-clipboard/clipboard' import { AppContext } from '../../Contexts/AppContext' import { Kind } from 'nostr-tools' @@ -28,14 +38,17 @@ import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityI import { useFocusEffect } from '@react-navigation/native' import ProfileCard from '../../Components/ProfileCard' import ProfileData from '../../Components/ProfileData' +import { handleInfinityScroll } from '../../Functions/NativeFunctions' export const ContactsFeed: React.FC = () => { const { t } = useTranslation('common') + const initialPageSize = 20 const { database } = useContext(AppContext) const { privateKey, publicKey, setContantsCount, setFollowersCount, nPub } = React.useContext(UserContext) const { relayPool, lastEventId } = useContext(RelayPoolContext) const theme = useTheme() + const [pageSize, setPageSize] = useState(initialPageSize) const bottomSheetAddContactRef = React.useRef(null) const bottomSheetProfileRef = React.useRef(null) // State @@ -162,15 +175,17 @@ export const ContactsFeed: React.FC = () => { }} > - + + +