mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Merge branch 'main' into candidate
This commit is contained in:
@ -123,7 +123,7 @@
|
|||||||
"muted": {
|
"muted": {
|
||||||
"accessibilityLabel": "Publicació silenciada"
|
"accessibilityLabel": "Publicació silenciada"
|
||||||
},
|
},
|
||||||
"replies": "Respostes <0 />",
|
"replies": "En resposta a <0 />",
|
||||||
"visibility": {
|
"visibility": {
|
||||||
"direct": {
|
"direct": {
|
||||||
"accessibilityLabel": "La publicació és un missatge directe"
|
"accessibilityLabel": "La publicació és un missatge directe"
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Etiqueta",
|
"hashtags": "Etiqueta",
|
||||||
"statuses": "Publicació"
|
"statuses": "Publicació"
|
||||||
},
|
},
|
||||||
"notFound": "No s'ha trobat <bold>{{searchTerm}}</bold> relacionat {{type}}"
|
"notFound": "No s'ha trobat <bold>{{searchTerm}}</bold> relacionat {{type}}",
|
||||||
|
"noResult": "No s'ha trobat res, prova-ho amb un altre terme"
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Discussions",
|
"name": "Discussions",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "",
|
"hashtags": "",
|
||||||
"statuses": ""
|
"statuses": ""
|
||||||
},
|
},
|
||||||
"notFound": ""
|
"notFound": "",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "",
|
"name": "",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtag",
|
"hashtags": "Hashtag",
|
||||||
"statuses": "Tröt"
|
"statuses": "Tröt"
|
||||||
},
|
},
|
||||||
"notFound": "Konnte <bold>{{searchTerm}}</bold>-bezogene {{type}} nicht finden"
|
"notFound": "Konnte <bold>{{searchTerm}}</bold>-bezogene {{type}} nicht finden",
|
||||||
|
"noResult": "Nichts gefunden, bitte versuchen Sie es mit einem anderen Begriff"
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Diskussionen",
|
"name": "Diskussionen",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtag",
|
"hashtags": "Hashtag",
|
||||||
"statuses": "Ανάρτηση"
|
"statuses": "Ανάρτηση"
|
||||||
},
|
},
|
||||||
"notFound": "Δεν είναι εφικτό να βρεθεί <bold>{{searchTerm}}</bold> που να έχει σχέση με {{type}}"
|
"notFound": "Δεν είναι εφικτό να βρεθεί <bold>{{searchTerm}}</bold> που να έχει σχέση με {{type}}",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Συζητήσεις",
|
"name": "Συζητήσεις",
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
"muted": {
|
"muted": {
|
||||||
"accessibilityLabel": "Toot silenciado"
|
"accessibilityLabel": "Toot silenciado"
|
||||||
},
|
},
|
||||||
"replies": "Respuestas <0 />",
|
"replies": "En respuesta a <0 />",
|
||||||
"visibility": {
|
"visibility": {
|
||||||
"direct": {
|
"direct": {
|
||||||
"accessibilityLabel": "El toot es un mensaje directo"
|
"accessibilityLabel": "El toot es un mensaje directo"
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtag",
|
"hashtags": "Hashtag",
|
||||||
"statuses": "Toot"
|
"statuses": "Toot"
|
||||||
},
|
},
|
||||||
"notFound": "No se pudo encontrar <bold>{{searchTerm}}</bold> relacionado con {{type}}"
|
"notFound": "No se pudo encontrar <bold>{{searchTerm}}</bold> relacionado con {{type}}",
|
||||||
|
"noResult": "No se ha podido encontrar nada, por favor, inténtelo con un término diferente"
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Discusiones",
|
"name": "Discusiones",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtag",
|
"hashtags": "Hashtag",
|
||||||
"statuses": "Pouet"
|
"statuses": "Pouet"
|
||||||
},
|
},
|
||||||
"notFound": "Impossible de trouver <bold>{{searchTerm}}</bold> lié à {{type}}"
|
"notFound": "Impossible de trouver <bold>{{searchTerm}}</bold> lié à {{type}}",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Discussions",
|
"name": "Discussions",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtag",
|
"hashtags": "Hashtag",
|
||||||
"statuses": "Toot"
|
"statuses": "Toot"
|
||||||
},
|
},
|
||||||
"notFound": "Impossibile trovare <bold>{{searchTerm}}</bold> come {{type}}"
|
"notFound": "Impossibile trovare <bold>{{searchTerm}}</bold> come {{type}}",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Discussioni",
|
"name": "Discussioni",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "ハッシュタグ",
|
"hashtags": "ハッシュタグ",
|
||||||
"statuses": "投稿"
|
"statuses": "投稿"
|
||||||
},
|
},
|
||||||
"notFound": "{{type}} <bold>{{searchTerm}}</bold> は見つかりませんでした"
|
"notFound": "{{type}} <bold>{{searchTerm}}</bold> は見つかりませんでした",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "スレッド",
|
"name": "スレッド",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "해시태그",
|
"hashtags": "해시태그",
|
||||||
"statuses": "툿"
|
"statuses": "툿"
|
||||||
},
|
},
|
||||||
"notFound": "<bold>{{searchTerm}}</bold>와 관련된 {{type}}을 찾을 수 없어요"
|
"notFound": "<bold>{{searchTerm}}</bold>와 관련된 {{type}}을 찾을 수 없어요",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "대화",
|
"name": "대화",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtag",
|
"hashtags": "Hashtag",
|
||||||
"statuses": "Toot"
|
"statuses": "Toot"
|
||||||
},
|
},
|
||||||
"notFound": "Kan <bold>{{searchTerm}}</bold> niet vinden gerelateerd aan {{type}}"
|
"notFound": "Kan <bold>{{searchTerm}}</bold> niet vinden gerelateerd aan {{type}}",
|
||||||
|
"noResult": "Kan niets vinden, probeer een andere term"
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Gesprek",
|
"name": "Gesprek",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtag",
|
"hashtags": "Hashtag",
|
||||||
"statuses": "Toot"
|
"statuses": "Toot"
|
||||||
},
|
},
|
||||||
"notFound": "Nie można odnaleźć <bold>{{searchTerm}}</bold> powiązanego {{type}}"
|
"notFound": "Nie można odnaleźć <bold>{{searchTerm}}</bold> powiązanego {{type}}",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Dyskusje",
|
"name": "Dyskusje",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Palavras-chave",
|
"hashtags": "Palavras-chave",
|
||||||
"statuses": "Toot"
|
"statuses": "Toot"
|
||||||
},
|
},
|
||||||
"notFound": "Não foi possível encontrar <bold>{{searchTerm}}</bold> {{type}} relacionado"
|
"notFound": "Não foi possível encontrar <bold>{{searchTerm}}</bold> {{type}} relacionado",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Discussões",
|
"name": "Discussões",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "",
|
"hashtags": "",
|
||||||
"statuses": ""
|
"statuses": ""
|
||||||
},
|
},
|
||||||
"notFound": ""
|
"notFound": "",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "",
|
"name": "",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtagg",
|
"hashtags": "Hashtagg",
|
||||||
"statuses": "Inlägg"
|
"statuses": "Inlägg"
|
||||||
},
|
},
|
||||||
"notFound": "Kan inte hitta <bold>{{searchTerm}}</bold>-relaterade {{type}}"
|
"notFound": "Kan inte hitta <bold>{{searchTerm}}</bold>-relaterade {{type}}",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Diskussioner",
|
"name": "Diskussioner",
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
},
|
},
|
||||||
"favourited": {
|
"favourited": {
|
||||||
"accessibilityLabel": "Додати дмух до улюблених",
|
"accessibilityLabel": "Додати дмух до улюблених",
|
||||||
"function": "Улюблені дмухи"
|
"function": "Вподобати дмух"
|
||||||
},
|
},
|
||||||
"bookmarked": {
|
"bookmarked": {
|
||||||
"accessibilityLabel": "Додати цей дмух до закладок",
|
"accessibilityLabel": "Додати цей дмух до закладок",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Ґештег",
|
"hashtags": "Ґештег",
|
||||||
"statuses": "Дмух"
|
"statuses": "Дмух"
|
||||||
},
|
},
|
||||||
"notFound": "Не вдалося знайти <bold>{{searchTerm}}</bold> пов'язаний з {{type}}"
|
"notFound": "Не вдалося знайти <bold>{{searchTerm}}</bold> пов'язаний з {{type}}",
|
||||||
|
"noResult": "Нічого не знайдено, спробуйте інший термін"
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Обговорення",
|
"name": "Обговорення",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "Hashtag",
|
"hashtags": "Hashtag",
|
||||||
"statuses": "Tút"
|
"statuses": "Tút"
|
||||||
},
|
},
|
||||||
"notFound": "Không tìm thấy {{type}} <bold>{{searchTerm}}</bold>"
|
"notFound": "Không tìm thấy {{type}} <bold>{{searchTerm}}</bold>",
|
||||||
|
"noResult": ""
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "Nội dung tút",
|
"name": "Nội dung tút",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "话题标签",
|
"hashtags": "话题标签",
|
||||||
"statuses": "嘟文"
|
"statuses": "嘟文"
|
||||||
},
|
},
|
||||||
"notFound": "找不到 <bold>{{searchTerm}}</bold> 相关的 {{type}}"
|
"notFound": "找不到 <bold>{{searchTerm}}</bold> 相关的 {{type}}",
|
||||||
|
"noResult": "搜索不到相关信息,请尝试不同关键词"
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "对话",
|
"name": "对话",
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
"hashtags": "主題標籤",
|
"hashtags": "主題標籤",
|
||||||
"statuses": "嘟文"
|
"statuses": "嘟文"
|
||||||
},
|
},
|
||||||
"notFound": "找不到 <bold>{{searchTerm}}</bold> 相關的 {{type}}"
|
"notFound": "找不到 <bold>{{searchTerm}}</bold> 相關的 {{type}}",
|
||||||
|
"noResult": "找不到任何東西,請嘗試其它用詞"
|
||||||
},
|
},
|
||||||
"toot": {
|
"toot": {
|
||||||
"name": "討論",
|
"name": "討論",
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { HeaderRight } from '@components/Header'
|
import { HeaderRight } from '@components/Header'
|
||||||
import Timeline from '@components/Timeline'
|
import Timeline from '@components/Timeline'
|
||||||
import SegmentedControl from '@react-native-community/segmented-control'
|
import SegmentedControl from '@react-native-community/segmented-control'
|
||||||
import { useNavigation } from '@react-navigation/native'
|
import { NativeStackScreenProps } from '@react-navigation/native-stack'
|
||||||
import { NativeStackNavigationProp, NativeStackScreenProps } from '@react-navigation/native-stack'
|
|
||||||
import { TabPublicStackParamList } from '@utils/navigation/navigators'
|
import { TabPublicStackParamList } from '@utils/navigation/navigators'
|
||||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||||
import { getGlobalStorage, setGlobalStorage } from '@utils/storage/actions'
|
import { getGlobalStorage, setGlobalStorage } from '@utils/storage/actions'
|
||||||
@ -14,12 +13,7 @@ import { Dimensions } from 'react-native'
|
|||||||
import { SceneMap, TabView } from 'react-native-tab-view'
|
import { SceneMap, TabView } from 'react-native-tab-view'
|
||||||
|
|
||||||
const Route = ({ route: { key: page } }: { route: any }) => {
|
const Route = ({ route: { key: page } }: { route: any }) => {
|
||||||
const navigation =
|
|
||||||
useNavigation<NativeStackNavigationProp<TabPublicStackParamList, 'Tab-Public-Root'>>()
|
|
||||||
const queryKey: QueryKeyTimeline = ['Timeline', { page }]
|
const queryKey: QueryKeyTimeline = ['Timeline', { page }]
|
||||||
useEffect(() => {
|
|
||||||
navigation.setParams({ queryKey })
|
|
||||||
}, [])
|
|
||||||
return <Timeline queryKey={queryKey} disableRefresh={page === 'Trending'} />
|
return <Timeline queryKey={queryKey} disableRefresh={page === 'Trending'} />
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,12 +29,11 @@ const Root: React.FC<NativeStackScreenProps<TabPublicStackParamList, 'Tab-Public
|
|||||||
const { mode } = useTheme()
|
const { mode } = useTheme()
|
||||||
const { t } = useTranslation('screenTabs')
|
const { t } = useTranslation('screenTabs')
|
||||||
|
|
||||||
const previousSegment = getGlobalStorage.string('app.prev_public_segment')
|
|
||||||
const segments: StorageGlobal['app.prev_public_segment'][] = ['Local', 'LocalPublic', 'Trending']
|
const segments: StorageGlobal['app.prev_public_segment'][] = ['Local', 'LocalPublic', 'Trending']
|
||||||
const [segment, setSegment] = useState<number>(
|
const [segment, setSegment] = useState<number>(
|
||||||
Math.max(
|
Math.max(
|
||||||
0,
|
0,
|
||||||
segments.findIndex(segment => segment === previousSegment)
|
segments.findIndex(segment => segment === getGlobalStorage.string('app.prev_public_segment'))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
const [routes] = useState([
|
const [routes] = useState([
|
||||||
@ -48,6 +41,10 @@ const Root: React.FC<NativeStackScreenProps<TabPublicStackParamList, 'Tab-Public
|
|||||||
{ key: 'LocalPublic', title: t('tabs.public.segments.federated') },
|
{ key: 'LocalPublic', title: t('tabs.public.segments.federated') },
|
||||||
{ key: 'Trending', title: t('tabs.public.segments.trending') }
|
{ key: 'Trending', title: t('tabs.public.segments.trending') }
|
||||||
])
|
])
|
||||||
|
useEffect(() => {
|
||||||
|
const page = segments[segment]
|
||||||
|
page && navigation.setParams({ queryKey: ['Timeline', { page }] })
|
||||||
|
}, [segment])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
navigation.setOptions({
|
navigation.setOptions({
|
||||||
|
@ -34,7 +34,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
|||||||
remote: ['Timeline', { page: 'Toot', toot: toot.id, remote: true }]
|
remote: ['Timeline', { page: 'Toot', toot: toot.id, remote: true }]
|
||||||
}
|
}
|
||||||
|
|
||||||
const flRef = useRef<FlatList<Mastodon.Status & { _level?: number }>>(null)
|
const flRef = useRef<FlatList<Mastodon.Status & { _level?: number; key?: string }>>(null)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
navigation.setOptions({
|
navigation.setOptions({
|
||||||
@ -72,11 +72,13 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
|||||||
}, [hasRemoteContent])
|
}, [hasRemoteContent])
|
||||||
|
|
||||||
const PREV_PER_BATCH = 1
|
const PREV_PER_BATCH = 1
|
||||||
const ancestorsCache = useRef<(Mastodon.Status & { _level?: number })[]>()
|
const ancestorsCache = useRef<(Mastodon.Status & { _level?: number; key?: string })[]>()
|
||||||
const loaded = useRef<boolean>(false)
|
const loaded = useRef<boolean>(false)
|
||||||
|
|
||||||
const match = urlMatcher(toot.url || toot.uri)
|
const match = urlMatcher(toot.url || toot.uri)
|
||||||
const query = useQuery<{ pages: { body: (Mastodon.Status & { _level?: number })[] }[] }>(
|
const query = useQuery<{
|
||||||
|
pages: { body: (Mastodon.Status & { _level?: number; key?: string })[] }[]
|
||||||
|
}>(
|
||||||
queryKey.local,
|
queryKey.local,
|
||||||
async () => {
|
async () => {
|
||||||
const context = await apiInstance<{
|
const context = await apiInstance<{
|
||||||
@ -109,7 +111,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
placeholderData: { pages: [{ body: [{ ...toot, _level: 0 }] }] },
|
placeholderData: { pages: [{ body: [{ ...toot, _level: 0, key: `${toot.id}_cache` }] }] },
|
||||||
enabled: !toot._remote,
|
enabled: !toot._remote,
|
||||||
staleTime: 0,
|
staleTime: 0,
|
||||||
refetchOnMount: true,
|
refetchOnMount: true,
|
||||||
|
Reference in New Issue
Block a user