mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Search is done
This commit is contained in:
@ -120,10 +120,11 @@ const Timeline: React.FC<Props> = ({
|
||||
() => !disableRefresh && fetchPreviousPage(),
|
||||
[]
|
||||
)
|
||||
const flOnEndReach = useCallback(() => fetchNextPage(), [])
|
||||
const flFooter = useCallback(() => {
|
||||
return <TimelineEnd hasNextPage={hasNextPage} />
|
||||
}, [hasNextPage])
|
||||
const flOnEndReach = useCallback(() => !disableRefresh && fetchNextPage(), [])
|
||||
const flFooter = useCallback(
|
||||
() => (!disableRefresh ? <TimelineEnd hasNextPage={hasNextPage} /> : null),
|
||||
[hasNextPage]
|
||||
)
|
||||
const onScrollToIndexFailed = useCallback(error => {
|
||||
const offset = error.averageItemLength * error.index
|
||||
flRef.current?.scrollToOffset({ offset })
|
||||
|
@ -38,7 +38,7 @@ const TimelineConversation: React.FC<Props> = ({
|
||||
paddingTop: highlighted ? StyleConstants.Spacing.S : 0,
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.S + StyleConstants.Spacing.S
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineContent
|
||||
@ -71,7 +71,7 @@ const TimelineConversation: React.FC<Props> = ({
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.S + StyleConstants.Spacing.S
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions queryKey={queryKey} status={item.last_status!} />
|
||||
|
@ -38,7 +38,7 @@ const TimelineDefault: React.FC<Props> = ({
|
||||
StyleConstants.Spacing.Global.PagePadding * 2 // Global page padding on both sides
|
||||
: Dimensions.get('window').width -
|
||||
StyleConstants.Spacing.Global.PagePadding * 2 - // Global page padding on both sides
|
||||
StyleConstants.Avatar.S - // Avatar width
|
||||
StyleConstants.Avatar.M - // Avatar width
|
||||
StyleConstants.Spacing.S // Avatar margin to the right
|
||||
|
||||
const tootOnPress = useCallback(
|
||||
@ -56,7 +56,7 @@ const TimelineDefault: React.FC<Props> = ({
|
||||
paddingTop: highlighted ? StyleConstants.Spacing.S : 0,
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.S + StyleConstants.Spacing.S
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
{actualStatus.content.length > 0 && (
|
||||
@ -100,7 +100,7 @@ const TimelineDefault: React.FC<Props> = ({
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.S + StyleConstants.Spacing.S
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions queryKey={queryKey} status={actualStatus} />
|
||||
|
@ -33,7 +33,7 @@ const TimelineNotifications: React.FC<Props> = ({
|
||||
StyleConstants.Spacing.Global.PagePadding * 2 // Global page padding on both sides
|
||||
: Dimensions.get('window').width -
|
||||
StyleConstants.Spacing.Global.PagePadding * 2 - // Global page padding on both sides
|
||||
StyleConstants.Avatar.S - // Avatar width
|
||||
StyleConstants.Avatar.M - // Avatar width
|
||||
StyleConstants.Spacing.S // Avatar margin to the right
|
||||
|
||||
const tootOnPress = useCallback(
|
||||
@ -51,7 +51,7 @@ const TimelineNotifications: React.FC<Props> = ({
|
||||
paddingTop: highlighted ? StyleConstants.Spacing.S : 0,
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.S + StyleConstants.Spacing.S
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
{notification.status.content.length > 0 && (
|
||||
@ -97,7 +97,7 @@ const TimelineNotifications: React.FC<Props> = ({
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.S + StyleConstants.Spacing.S
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions queryKey={queryKey} status={notification.status} />
|
||||
|
@ -20,7 +20,7 @@ const TimelineSeparator: React.FC<Props> = ({ highlighted = false }) => {
|
||||
marginLeft: highlighted
|
||||
? StyleConstants.Spacing.Global.PagePadding
|
||||
: StyleConstants.Spacing.Global.PagePadding +
|
||||
StyleConstants.Avatar.S +
|
||||
StyleConstants.Avatar.M +
|
||||
StyleConstants.Spacing.S
|
||||
}
|
||||
]}
|
||||
|
@ -107,7 +107,7 @@ const styles = StyleSheet.create({
|
||||
marginBottom: StyleConstants.Spacing.S
|
||||
},
|
||||
icon: {
|
||||
marginLeft: StyleConstants.Avatar.S - StyleConstants.Font.Size.S,
|
||||
marginLeft: StyleConstants.Avatar.M - StyleConstants.Font.Size.S,
|
||||
marginRight: StyleConstants.Spacing.S
|
||||
},
|
||||
content: {
|
||||
|
@ -27,8 +27,8 @@ const TimelineAvatar: React.FC<Props> = ({ queryKey, account }) => {
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
avatar: {
|
||||
flexBasis: StyleConstants.Avatar.S,
|
||||
height: StyleConstants.Avatar.S,
|
||||
flexBasis: StyleConstants.Avatar.M,
|
||||
height: StyleConstants.Avatar.M,
|
||||
marginRight: StyleConstants.Spacing.S
|
||||
},
|
||||
image: {
|
||||
|
Reference in New Issue
Block a user