diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 478da943..ca759e9e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -306,7 +306,7 @@ PODS: - React-Core - react-native-language-detection (0.2.2): - React - - react-native-menu (0.7.2): + - react-native-menu (0.7.3): - React - react-native-mmkv (2.5.1): - MMKV (>= 1.2.13) @@ -748,7 +748,7 @@ SPEC CHECKSUMS: react-native-image-picker: 60f4246eb5bb7187fc15638a8c1f13abd3820695 react-native-ios-context-menu: b170594b4448c0cd10c79e13432216bac99de1ac react-native-language-detection: f414937fa715108ab50a6269a3de0bcb95e4ceb0 - react-native-menu: 8e172cfcf0e42e92f028e7781eddf84d430cae24 + react-native-menu: 9d7d6f819cc7fa14a15cf86888c53f3240d86f1b react-native-mmkv: 69b9c003f10afdd01addf7c6ee784ce42ee2eff3 react-native-netinfo: 2517ad504b3d303e90d7a431b0fcaef76d207983 react-native-pager-view: 54bed894cecebe28cede54c01038d9d1e122de43 diff --git a/ios/tooot/Info.plist b/ios/tooot/Info.plist index d6741b51..4317bfa3 100644 --- a/ios/tooot/Info.plist +++ b/ios/tooot/Info.plist @@ -86,5 +86,7 @@ Automatic UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + diff --git a/src/components/AccountButton.tsx b/src/components/AccountButton.tsx index d36f6bb4..ff3e497f 100644 --- a/src/components/AccountButton.tsx +++ b/src/components/AccountButton.tsx @@ -15,7 +15,7 @@ interface Props { const AccountButton: React.FC = ({ account, selected = false, additionalActions }) => { const navigation = useNavigation() const accountDetails = getAccountDetails( - ['auth.account.acct', 'auth.domain', 'auth.account.id'], + ['auth.domain', 'auth.account.acct', 'auth.account.domain', 'auth.account.id'], account ) if (!accountDetails) return null @@ -28,7 +28,7 @@ const AccountButton: React.FC = ({ account, selected = false, additionalA marginBottom: StyleConstants.Spacing.M, marginRight: StyleConstants.Spacing.M }} - content={`@${accountDetails['auth.account.acct']}@${accountDetails['auth.domain']}${ + content={`@${accountDetails['auth.account.acct']}@${accountDetails['auth.account.domain']}${ selected ? ' ✓' : '' }`} onPress={() => { diff --git a/src/components/Instance/index.tsx b/src/components/Instance/index.tsx index 0e9cbd71..1b368a58 100644 --- a/src/components/Instance/index.tsx +++ b/src/components/Instance/index.tsx @@ -123,6 +123,8 @@ const ComponentInstance: React.FC = ({ 'auth.domain': domain, 'auth.account.id': id, 'auth.account.acct': acct, + // @ts-ignore + 'auth.account.domain': instanceQuery.data?.domain || instanceQuery.data?.uri, 'auth.account.avatar_static': avatar_static, version: instanceQuery.data?.version || '0', preferences: undefined, diff --git a/src/screens/Compose/Root/Header/PostingAs.tsx b/src/screens/Compose/Root/Header/PostingAs.tsx index dcfc03e5..cc79dbbe 100644 --- a/src/screens/Compose/Root/Header/PostingAs.tsx +++ b/src/screens/Compose/Root/Header/PostingAs.tsx @@ -23,7 +23,7 @@ const ComposePostingAs = () => { {t('content.root.header.postingAs', { acct: getAccountStorage.string('auth.account.acct'), - domain: getAccountStorage.string('auth.domain') + domain: getAccountStorage.string('auth.account.domain') })} diff --git a/src/screens/Tabs/Me/Push.tsx b/src/screens/Tabs/Me/Push.tsx index b87d9795..5a014699 100644 --- a/src/screens/Tabs/Me/Push.tsx +++ b/src/screens/Tabs/Me/Push.tsx @@ -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 ( @@ -152,7 +153,7 @@ const TabMePush: React.FC = () => { ) : null} { // @ts-ignore LOCALES[ Platform.OS === 'ios' - ? Localization.locale.toLowerCase().replace(new RegExp(/.*-.*(-.*)/, 'i'), '') + ? Localization.locale.replace(new RegExp(/.*-.*(-.*)/, 'i'), '') : i18n.language.toLowerCase() ] } diff --git a/src/screens/Tabs/Me/Settings/Dev.tsx b/src/screens/Tabs/Me/Settings/Dev.tsx index 8ed3b312..c015f00c 100644 --- a/src/screens/Tabs/Me/Settings/Dev.tsx +++ b/src/screens/Tabs/Me/Settings/Dev.tsx @@ -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() }} />