1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2020-12-18 00:00:45 +01:00
parent b679b56a0e
commit 7be25ae516
13 changed files with 144 additions and 78 deletions

View File

@ -74,7 +74,7 @@ const renderNode = ({
)
}
} else {
const domain = href.split(new RegExp(/:\/\/(.*?)\//))
const domain = href.split(new RegExp(/:\/\/(.[^\/]+)/))
return (
<Text
key={index}

View File

@ -19,7 +19,6 @@ export interface Props {
toot?: Mastodon.Status
account?: string
disableRefresh?: boolean
scrollEnabled?: boolean
}
const Timeline: React.FC<Props> = ({
@ -28,8 +27,7 @@ const Timeline: React.FC<Props> = ({
list,
toot,
account,
disableRefresh = false,
scrollEnabled = true
disableRefresh = false
}) => {
setFocusHandler(handleFocus => {
const handleAppStateChange = (appState: string) => {
@ -160,7 +158,6 @@ const Timeline: React.FC<Props> = ({
renderItem={flRenderItem}
onEndReached={flOnEndReach}
keyExtractor={flKeyExtrator}
scrollEnabled={scrollEnabled} // For timeline in Account view
ListFooterComponent={flFooter}
ListEmptyComponent={flItemEmptyComponent}
ItemSeparatorComponent={flItemSeparatorComponent}

View File

@ -44,7 +44,7 @@ const TimelineDefault: React.FC<Props> = ({
const tootOnPress = useCallback(
() =>
!isRemotePublic &&
navigation.navigate('Screen-Shared-Toot', {
navigation.push('Screen-Shared-Toot', {
toot: actualStatus
}),
[]

View File

@ -1,7 +1,7 @@
import React, { useCallback } from 'react'
import { Image, Pressable, StyleSheet } from 'react-native'
import { useNavigation } from '@react-navigation/native'
import { StyleConstants } from '@utils/styles/constants'
import { useNavigation } from '@react-navigation/native'
export interface Props {
queryKey?: App.QueryKey
@ -13,7 +13,7 @@ const TimelineAvatar: React.FC<Props> = ({ queryKey, account }) => {
// Need to fix go back root
const onPress = useCallback(() => {
queryKey &&
navigation.navigate('Screen-Shared-Account', {
navigation.push('Screen-Shared-Account', {
id: account.id
})
}, [])