mirror of
https://github.com/tooot-app/app
synced 2025-01-27 08:51:26 +01:00
Using Crowdin now
This commit is contained in:
parent
9229a0256f
commit
c4ec88609e
@ -7,11 +7,11 @@
|
||||
"notificationsFilter": {
|
||||
"heading": "Show notification types",
|
||||
"content": {
|
||||
"follow": "$t(me.push.follow.heading)",
|
||||
"favourite": "$t(me.push.favourite.heading)",
|
||||
"reblog": "$t(me.push.reblog.heading)",
|
||||
"mention": "$t(me.push.mention.heading)",
|
||||
"poll": "$t(me.push.poll.heading)",
|
||||
"follow": "$t(screenTabs:me.push.follow.heading)",
|
||||
"favourite": "$t(screenTabs:me.push.favourite.heading)",
|
||||
"reblog": "$t(screenTabs:me.push.reblog.heading)",
|
||||
"mention": "$t(screenTabs:me.push.mention.heading)",
|
||||
"poll": "$t(screenTabs:me.push.poll.heading)",
|
||||
"follow_request": "Follow request"
|
||||
}
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
"notificationsFilter": {
|
||||
"heading": "显示通知",
|
||||
"content": {
|
||||
"follow": "$t(me.push.follow.heading)",
|
||||
"favourite": "$t(me.push.favourite.heading)",
|
||||
"reblog": "$t(me.push.reblog.heading)",
|
||||
"mention": "$t(me.push.mention.heading)",
|
||||
"poll": "$t(me.push.poll.heading)",
|
||||
"follow": "$t(screenTabs:me.push.follow.heading)",
|
||||
"favourite": "$t(screenTabs:me.push.favourite.heading)",
|
||||
"reblog": "$t(screenTabs:me.push.reblog.heading)",
|
||||
"mention": "$t(screenTabs:me.push.mention.heading)",
|
||||
"poll": "$t(screenTabs:me.push.poll.heading)",
|
||||
"follow_request": "关注请求"
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@ import { useTranslation } from 'react-i18next'
|
||||
|
||||
const AccountInformationSwitch: React.FC = () => {
|
||||
const navigation = useNavigation()
|
||||
const { t } = useTranslation()
|
||||
const { t } = useTranslation('screenTabs')
|
||||
|
||||
return (
|
||||
<Button
|
||||
type='text'
|
||||
content={t('meSwitch:heading')}
|
||||
content={t('me.stacks.switch.name')}
|
||||
onPress={() => navigation.navigate('Tab-Me-Switch')}
|
||||
/>
|
||||
)
|
||||
|
@ -25,7 +25,7 @@ export type QueryKeyTimeline = [
|
||||
}
|
||||
]
|
||||
|
||||
const queryFunction = ({
|
||||
const queryFunction = async ({
|
||||
queryKey,
|
||||
pageParam
|
||||
}: {
|
||||
@ -87,29 +87,28 @@ const queryFunction = ({
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return apiInstance<(Mastodon.Status & { _pinned: boolean })[]>({
|
||||
const res1 = await apiInstance<(Mastodon.Status & { _pinned: boolean} )[]>({
|
||||
method: 'get',
|
||||
url: `accounts/${account}/statuses`,
|
||||
params: {
|
||||
pinned: 'true'
|
||||
}
|
||||
}).then(async res1 => {
|
||||
res1.body = res1.body.map(status => {
|
||||
status._pinned = true
|
||||
return status
|
||||
})
|
||||
const res2 = await apiInstance<Mastodon.Status[]>({
|
||||
method: 'get',
|
||||
url: `accounts/${account}/statuses`,
|
||||
params: {
|
||||
exclude_replies: 'true'
|
||||
}
|
||||
})
|
||||
return {
|
||||
body: uniqBy([...res1.body, ...res2.body], 'id'),
|
||||
...(res2.links.next && { links: { next: res2.links.next } })
|
||||
})
|
||||
res1.body = res1.body.map(status => {
|
||||
status._pinned = true
|
||||
return status
|
||||
})
|
||||
const res2 = await apiInstance<Mastodon.Status[]>({
|
||||
method: 'get',
|
||||
url: `accounts/${account}/statuses`,
|
||||
params: {
|
||||
exclude_replies: 'true'
|
||||
}
|
||||
})
|
||||
return await {
|
||||
body: uniqBy([...res1.body, ...res2.body], 'id'),
|
||||
...(res2.links.next && { links: { next: res2.links.next } })
|
||||
}
|
||||
}
|
||||
|
||||
case 'Account_All':
|
||||
@ -165,21 +164,20 @@ const queryFunction = ({
|
||||
})
|
||||
|
||||
case 'Toot':
|
||||
return apiInstance<Mastodon.Status>({
|
||||
const res1_1 = await apiInstance<Mastodon.Status>({
|
||||
method: 'get',
|
||||
url: `statuses/${toot}`
|
||||
}).then(async res1 => {
|
||||
const res2 = await apiInstance<{
|
||||
ancestors: Mastodon.Status[]
|
||||
descendants: Mastodon.Status[]
|
||||
}>({
|
||||
method: 'get',
|
||||
url: `statuses/${toot}/context`
|
||||
})
|
||||
return {
|
||||
body: [...res2.body.ancestors, res1.body, ...res2.body.descendants]
|
||||
}
|
||||
})
|
||||
const res2_1 = await apiInstance<{
|
||||
ancestors: Mastodon.Status[]
|
||||
descendants: Mastodon.Status[]
|
||||
}>({
|
||||
method: 'get',
|
||||
url: `statuses/${toot}/context`
|
||||
})
|
||||
return await {
|
||||
body: [...res2_1.body.ancestors, res1_1.body, ...res2_1.body.descendants]
|
||||
}
|
||||
default:
|
||||
return Promise.reject()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user