mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fix public domain and API domain differ
This commit is contained in:
@ -23,7 +23,7 @@ const ComposePostingAs = () => {
|
||||
<CustomText fontStyle='S' style={{ color: colors.secondary }}>
|
||||
{t('content.root.header.postingAs', {
|
||||
acct: getAccountStorage.string('auth.account.acct'),
|
||||
domain: getAccountStorage.string('auth.domain')
|
||||
domain: getAccountStorage.string('auth.account.domain')
|
||||
})}
|
||||
</CustomText>
|
||||
</View>
|
||||
|
@ -29,8 +29,9 @@ const TabMePush: React.FC = () => {
|
||||
const [expoToken] = useGlobalStorage.string('app.expo_token')
|
||||
const [push] = useAccountStorage.object('push')
|
||||
const [domain] = useAccountStorage.string('auth.domain')
|
||||
const [accountId] = useAccountStorage.string('auth.account.id')
|
||||
const [accountAcct] = useAccountStorage.string('auth.account.acct')
|
||||
const [accountDomain] = useAccountStorage.string('auth.account.domain')
|
||||
const [accountId] = useAccountStorage.string('auth.account.id')
|
||||
|
||||
const appsQuery = useAppsQuery()
|
||||
|
||||
@ -119,7 +120,7 @@ const TabMePush: React.FC = () => {
|
||||
: null
|
||||
|
||||
const pushPath = `${expoToken}/${domain}/${accountId}`
|
||||
const accountFull = `@${accountAcct}@${domain}`
|
||||
const accountFull = `@${accountAcct}@${accountDomain}`
|
||||
|
||||
return (
|
||||
<ScrollView>
|
||||
@ -152,7 +153,7 @@ const TabMePush: React.FC = () => {
|
||||
) : null}
|
||||
<MenuContainer>
|
||||
<MenuRow
|
||||
title={t('me.push.global.heading', { acct: `@${accountAcct}@${domain}` })}
|
||||
title={t('me.push.global.heading', { acct: `@${accountAcct}@${accountDomain}` })}
|
||||
description={t('me.push.global.description')}
|
||||
switchDisabled={!pushEnabled}
|
||||
switchValue={pushEnabled === false ? false : push?.global}
|
||||
|
@ -38,7 +38,7 @@ const SettingsApp: React.FC = () => {
|
||||
// @ts-ignore
|
||||
LOCALES[
|
||||
Platform.OS === 'ios'
|
||||
? Localization.locale.toLowerCase().replace(new RegExp(/.*-.*(-.*)/, 'i'), '')
|
||||
? Localization.locale.replace(new RegExp(/.*-.*(-.*)/, 'i'), '')
|
||||
: i18n.language.toLowerCase()
|
||||
]
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import Button from '@components/Button'
|
||||
import { MenuContainer, MenuRow } from '@components/Menu'
|
||||
import { displayMessage } from '@components/Message'
|
||||
import { useActionSheet } from '@expo/react-native-action-sheet'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { androidActionSheetStyles } from '@utils/helpers/androidActionSheetStyles'
|
||||
import { storage } from '@utils/storage'
|
||||
import { getGlobalStorage, useGlobalStorage } from '@utils/storage/actions'
|
||||
@ -11,6 +12,7 @@ import React from 'react'
|
||||
import { MMKV } from 'react-native-mmkv'
|
||||
|
||||
const SettingsDev: React.FC = () => {
|
||||
const navigation = useNavigation()
|
||||
const { colors } = useTheme()
|
||||
const { showActionSheetWithOptions } = useActionSheet()
|
||||
|
||||
@ -54,16 +56,17 @@ const SettingsDev: React.FC = () => {
|
||||
destructive
|
||||
onPress={() => {
|
||||
const accounts = getGlobalStorage.object('accounts')
|
||||
if (!accounts) return
|
||||
|
||||
for (const account of accounts) {
|
||||
console.log('Clearing', account)
|
||||
const temp = new MMKV({ id: account })
|
||||
temp.clearAll()
|
||||
storage.account = undefined
|
||||
if (accounts) {
|
||||
for (const account of accounts) {
|
||||
console.log('Clearing', account)
|
||||
const temp = new MMKV({ id: account })
|
||||
temp.clearAll()
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Clearing', 'global')
|
||||
storage.global.clearAll()
|
||||
navigation.goBack()
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
|
@ -19,7 +19,7 @@ const AccountInformationAccount: React.FC<Props> = ({ account, myInfo }) => {
|
||||
const { colors } = useTheme()
|
||||
|
||||
const [acct] = useAccountStorage.string('auth.account.acct')
|
||||
const domain = getAccountStorage.string('auth.domain')
|
||||
const domain = getAccountStorage.string('auth.account.domain')
|
||||
|
||||
const { data: relationship } = useRelationshipQuery({
|
||||
id: account?.id || '',
|
||||
|
@ -74,7 +74,7 @@ const TabSharedReport: React.FC<TabSharedStackScreenProps<'Tab-Shared-Report'>>
|
||||
}, [isReporting, comment, forward, categories, rules])
|
||||
|
||||
const localInstance = account?.acct.includes('@')
|
||||
? account?.acct.includes(`@${getAccountStorage.string('auth.domain')}`)
|
||||
? account?.acct.includes(`@${getAccountStorage.string('auth.account.domain')}`)
|
||||
: true
|
||||
|
||||
const rulesQuery = useRulesQuery()
|
||||
|
Reference in New Issue
Block a user