mirror of https://github.com/tooot-app/app
Fixed #105
This commit is contained in:
parent
7a12792393
commit
251695cc46
|
@ -2,7 +2,6 @@ import analytics from '@components/analytics'
|
|||
import Icon from '@components/Icon'
|
||||
import { MenuContainer, MenuRow } from '@components/Menu'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { useSearchQuery } from '@utils/queryHooks/search'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import * as Updates from 'expo-updates'
|
||||
|
@ -20,11 +19,6 @@ const SettingsTooot: React.FC = () => {
|
|||
const { theme } = useTheme()
|
||||
const { t } = useTranslation('screenTabs')
|
||||
|
||||
const { isLoading, data } = useSearchQuery({
|
||||
term: '@tooot@xmflsct.com',
|
||||
options: { enabled: instanceActive !== -1 }
|
||||
})
|
||||
|
||||
return (
|
||||
<MenuContainer>
|
||||
<MenuRow
|
||||
|
@ -66,7 +60,6 @@ const SettingsTooot: React.FC = () => {
|
|||
) : null}
|
||||
<MenuRow
|
||||
title={t('me.settings.contact.heading')}
|
||||
loading={isLoading}
|
||||
content={
|
||||
<Icon
|
||||
name='Mail'
|
||||
|
@ -76,15 +69,10 @@ const SettingsTooot: React.FC = () => {
|
|||
}
|
||||
iconBack='ChevronRight'
|
||||
onPress={() => {
|
||||
const foundAccounts = data?.accounts.filter(
|
||||
account =>
|
||||
account.acct === 'tooot@xmflsct.com' ||
|
||||
account.url === 'https://social.xmflsct.com/@tooot'
|
||||
)
|
||||
if (foundAccounts?.length === 1) {
|
||||
if (instanceActive !== -1) {
|
||||
navigation.navigate('Screen-Compose', {
|
||||
type: 'conversation',
|
||||
accts: [foundAccounts[0].acct]
|
||||
accts: ['tooot@xmflsct.com']
|
||||
})
|
||||
} else {
|
||||
WebBrowser.openBrowserAsync('https://social.xmflsct.com/@tooot')
|
||||
|
|
Loading…
Reference in New Issue