1
0
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:
xmflsct
2022-12-05 14:53:08 +01:00
18 changed files with 51 additions and 40 deletions

View File

@ -1,6 +1,6 @@
{
"name": "tooot",
"version": "4.6.5",
"version": "4.6.6",
"description": "tooot for Mastodon",
"author": "xmflsct <me@xmflsct.com>",
"license": "GPL-3.0-or-later",

View File

@ -1,4 +1,5 @@
import { ActionSheetProvider } from '@expo/react-native-action-sheet'
import getLanguage from '@helpers/getLanguage'
import queryClient from '@helpers/queryClient'
import i18n from '@root/i18n/i18n'
import Screens from '@root/Screens'
@ -12,7 +13,7 @@ import timezone from '@root/startup/timezone'
import { persistor, store } from '@root/store'
import * as Sentry from '@sentry/react-native'
import AccessibilityManager from '@utils/accessibility/AccessibilityManager'
import { changeLanguage, getSettingsLanguage } from '@utils/slices/settingsSlice'
import { changeLanguage } from '@utils/slices/settingsSlice'
import ThemeManager from '@utils/styles/ThemeManager'
import * as Localization from 'expo-localization'
import * as SplashScreen from 'expo-splash-screen'
@ -85,7 +86,7 @@ const App: React.FC = () => {
if (bootstrapped) {
log('log', 'App', 'loading actual app :)')
log('log', 'App', `Locale: ${Localization.locale}`)
const language = getSettingsLanguage(store.getState())
const language = getLanguage()
if (!language) {
if (Platform.OS !== 'ios') {
store.dispatch(changeLanguage('en'))

View File

@ -120,7 +120,7 @@ const TimelineDefault: React.FC<Props> = ({
queryKey,
rootQueryKey,
status,
isReblog: !!item.reblog,
reblogStatus: item.reblog ? item : undefined,
ownAccount,
spoilerHidden,
copiableContent,

View File

@ -38,7 +38,7 @@ const TimelineNotifications: React.FC<Props> = ({
}) => {
const instanceAccount = useSelector(getInstanceAccount, () => true)
const status = notification.status
const status = notification.status?.reblog ? notification.status.reblog : notification.status
const account = notification.status ? notification.status.account : notification.account
const ownAccount = notification.account?.id === instanceAccount?.id
const [spoilerExpanded, setSpoilerExpanded] = useState(
@ -78,7 +78,11 @@ const TimelineNotifications: React.FC<Props> = ({
return (
<>
{notification.type !== 'mention' ? (
<TimelineActioned action={notification.type} isNotification account={account} />
<TimelineActioned
action={notification.type}
isNotification
account={notification.account}
/>
) : null}
<View
@ -132,7 +136,6 @@ const TimelineNotifications: React.FC<Props> = ({
value={{
queryKey,
status,
isReblog: !!status?.reblog,
ownAccount,
spoilerHidden,
copiableContent,

View File

@ -13,12 +13,12 @@ import StatusContext from './Context'
export interface Props {
action: Mastodon.Notification['type'] | 'reblog' | 'pinned'
isNotification?: boolean
account?: Mastodon.Account
account?: Mastodon.Account // For notification
}
const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest }) => {
const { status } = useContext(StatusContext)
const account = isNotification ? rest.account : status?.account
const { status, reblogStatus } = useContext(StatusContext)
const account = rest.account || (reblogStatus ? reblogStatus.account : status?.account)
if (!status || !account) return null
const { t } = useTranslation('componentTimeline')

View File

@ -22,7 +22,7 @@ import { useSelector } from 'react-redux'
import StatusContext from './Context'
const TimelineActions: React.FC = () => {
const { queryKey, rootQueryKey, status, isReblog, ownAccount, highlighted, disableDetails } =
const { queryKey, rootQueryKey, status, reblogStatus, ownAccount, highlighted, disableDetails } =
useContext(StatusContext)
if (!queryKey || !status || disableDetails) return null
@ -109,7 +109,7 @@ const TimelineActions: React.FC = () => {
queryKey,
rootQueryKey,
id: status.id,
isReblog,
isReblog: !!reblogStatus,
payload: {
property: 'reblogged',
currentValue: status.reblogged,
@ -125,7 +125,7 @@ const TimelineActions: React.FC = () => {
queryKey,
rootQueryKey,
id: status.id,
isReblog,
isReblog: !!reblogStatus,
payload: {
property: 'reblogged',
currentValue: status.reblogged,
@ -144,7 +144,7 @@ const TimelineActions: React.FC = () => {
queryKey,
rootQueryKey,
id: status.id,
isReblog,
isReblog: !!reblogStatus,
payload: {
property: 'reblogged',
currentValue: status.reblogged,
@ -161,7 +161,7 @@ const TimelineActions: React.FC = () => {
queryKey,
rootQueryKey,
id: status.id,
isReblog,
isReblog: !!reblogStatus,
payload: {
property: 'favourited',
currentValue: status.favourited,
@ -176,7 +176,7 @@ const TimelineActions: React.FC = () => {
queryKey,
rootQueryKey,
id: status.id,
isReblog,
isReblog: !!reblogStatus,
payload: {
property: 'bookmarked',
currentValue: status.bookmarked,

View File

@ -7,7 +7,7 @@ type ContextType = {
status?: Mastodon.Status
isReblog?: boolean
reblogStatus?: Mastodon.Status // When it is a reblog, pass the root status
ownAccount?: boolean
spoilerHidden?: boolean
copiableContent?: React.MutableRefObject<{

View File

@ -20,8 +20,15 @@ import { useQueryClient } from 'react-query'
import StatusContext from './Context'
const TimelinePoll: React.FC = () => {
const { queryKey, rootQueryKey, status, isReblog, ownAccount, spoilerHidden, disableDetails } =
useContext(StatusContext)
const {
queryKey,
rootQueryKey,
status,
reblogStatus,
ownAccount,
spoilerHidden,
disableDetails
} = useContext(StatusContext)
if (!queryKey || !status || !status.poll) return null
const poll = status.poll
@ -78,7 +85,7 @@ const TimelinePoll: React.FC = () => {
queryKey,
rootQueryKey,
id: status.id,
isReblog,
isReblog: !!reblogStatus,
payload: {
property: 'poll',
id: poll.id,
@ -104,7 +111,7 @@ const TimelinePoll: React.FC = () => {
queryKey,
rootQueryKey,
id: status.id,
isReblog,
isReblog: !!reblogStatus,
payload: {
property: 'poll',
id: poll.id,

View File

@ -20,8 +20,8 @@
}
},
"at": {
"direct": "",
"public": ""
"direct": "Missatge directe",
"public": "Missatge públic"
},
"copy": {
"action": "Copia la publicació",

View File

@ -352,7 +352,7 @@
}
},
"trending": {
"tags": ""
"tags": "Etiquetes en tendència"
}
},
"sections": {

View File

@ -20,8 +20,8 @@
}
},
"at": {
"direct": "",
"public": ""
"direct": "Mensaje directo",
"public": "Mensaje público"
},
"copy": {
"action": "Copiar toot",

View File

@ -352,7 +352,7 @@
}
},
"trending": {
"tags": ""
"tags": "Etiquetas en tendencia"
}
},
"sections": {

View File

@ -20,8 +20,8 @@
}
},
"at": {
"direct": "",
"public": ""
"direct": "ダイレクトメッセージ",
"public": "パブリックメッセージ"
},
"copy": {
"action": "トゥートをコピー",

View File

@ -6,7 +6,7 @@
"action_false": "Volg gebruiker",
"action_true": "Ontvolg"
},
"inLists": "Gebruiker van lijsten beheren",
"inLists": "Gebruiker op lijsten beheren",
"mute": {
"action_false": "Gebruiker dempen",
"action_true": "Dempen opheffen voor gebruiker"
@ -20,8 +20,8 @@
}
},
"at": {
"direct": "",
"public": ""
"direct": "Direct bericht",
"public": "Openbaar bericht"
},
"copy": {
"action": "Toot kopiëren",

View File

@ -1,6 +1,6 @@
{
"title": "Selecteer mediabron",
"message": "Media EXIF-gegevens zijn niet geüpload",
"message": "Media EXIF gegevens worden niet geüpload",
"options": {
"image": "Foto's uploaden",
"image_max": "Foto's uploaden (max {{max}})",

View File

@ -1,7 +1,7 @@
{
"screenshot": {
"title": "Privacy Bescherming",
"message": "Gelieve de identiteit van een andere gebruiker niet openbaar te maken, zoals gebruikersnaam, avatar enz. Bedankt!",
"message": "Gelieve de identiteit van een andere gebruiker niet openbaar te maken, zoals gebruikersnaam of avatar en meer. Bedankt!",
"button": "Bevestig"
},
"localCorrupt": {

View File

@ -290,7 +290,7 @@
"heading": "Tooot beoordelen"
},
"contact": {
"heading": "Contacteer tooot"
"heading": "Tooot contacteren"
},
"version": "Version v{{version}}",
"instanceVersion": "Mastodon versie v{{version}}"
@ -341,7 +341,7 @@
"placeholder": "naar..."
},
"empty": {
"general": "Enter keyword to search for <bold>$t(screenTabs:shared.search.sections.accounts)</bold><bold>$t(screenTabs:shared.search.sections.hashtags)</bold> or <bold>$t(screenTabs:shared.search.sections.statuses)</bold>",
"general": "Voer trefwoord in om te zoeken naar <bold>$t(screenTabs:shared.search.sections.accounts)</bold>, <bold>$t(screenTabs:shared.search.sections.hashtags)</bold> of <bold>$t(screenTabs:shared.search.sections.statuses)</bold>",
"advanced": {
"header": "Geavanceerd zoeken",
"example": {
@ -352,7 +352,7 @@
}
},
"trending": {
"tags": ""
"tags": "Trending tags"
}
},
"sections": {
@ -363,7 +363,7 @@
"notFound": "Kan <bold>{{searchTerm}}</bold> niet vinden gerelateerd aan {{type}}"
},
"toot": {
"name": "Discussies"
"name": "Gesprek"
},
"users": {
"accounts": {

View File

@ -4,8 +4,8 @@ import log from './log'
const audio = () => {
log('log', 'audio', 'setting audio playback default options')
Audio.setAudioModeAsync({
interruptionModeIOS: InterruptionModeIOS.DuckOthers,
interruptionModeAndroid: InterruptionModeAndroid.DuckOthers,
interruptionModeIOS: InterruptionModeIOS.DoNotMix,
interruptionModeAndroid: InterruptionModeAndroid.DoNotMix,
playsInSilentModeIOS: true,
staysActiveInBackground: false
})