diff --git a/.envrc.example b/.envrc.example index a45f2cc7..fd559adf 100644 --- a/.envrc.example +++ b/.envrc.example @@ -3,9 +3,6 @@ export ENVIRONMENT="development" export SENTRY_ORGANIZATION="" export SENTRY_PROJECT="" export SENTRY_AUTH_TOKEN="" -export SENTRY_DSN="" - -export TOOOT_PUSH_KEY_PUBLIC="" # Fastlane start export LC_ALL="" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91fdb20f..e9fc022b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,8 +43,6 @@ jobs: SENTRY_ORGANIZATION: ${{ secrets.SENTRY_ORGANIZATION }} SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - TOOOT_PUSH_KEY_PUBLIC: ${{ secrets.TOOOT_PUSH_KEY_PUBLIC }} FASTLANE_USER: ${{ secrets.FASTLANE_USER }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} diff --git a/app.config.ts b/app.config.ts index c0114653..73f78825 100644 --- a/app.config.ts +++ b/app.config.ts @@ -12,10 +12,6 @@ export default (): ExpoConfig => ({ version: toootVersion, privacy: 'hidden', assetBundlePatterns: ['assets/*'], - extra: { - sentryDSN: process.env.SENTRY_DSN, - toootPushKeyPublic: process.env.TOOOT_PUSH_KEY_PUBLIC - }, hooks: { postPublish: [ { diff --git a/package.json b/package.json index 2b9bfe16..caf787f8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "native": "220508", "major": 4, "minor": 0, - "patch": 0, + "patch": 1, "expo": "45.0.0" }, "description": "tooot app for Mastodon", diff --git a/src/App.tsx b/src/App.tsx index 214d097a..c0032d71 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -54,7 +54,6 @@ import { enableFreeze } from 'react-native-screens' import { QueryClientProvider } from 'react-query' import { Provider } from 'react-redux' import { PersistGate } from 'redux-persist/integration/react' -import { IntlProvider } from 'react-intl' Platform.select({ android: LogBox.ignoreLogs(['Setting a timer for a long period of time']) @@ -132,9 +131,7 @@ const App: React.FC = () => { - - - + diff --git a/src/Screens.tsx b/src/Screens.tsx index 6fa2fa60..53d27938 100644 --- a/src/Screens.tsx +++ b/src/Screens.tsx @@ -26,6 +26,7 @@ import * as Linking from 'expo-linking' import { addScreenshotListener } from 'expo-screen-capture' import React, { useCallback, useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' +import { IntlProvider } from 'react-intl' import { Alert, Platform, StatusBar } from 'react-native' import ShareMenu from 'react-native-share-menu' import { useSelector } from 'react-redux' @@ -39,7 +40,7 @@ export interface Props { } const Screens: React.FC = ({ localCorrupt }) => { - const { t } = useTranslation('screens') + const { i18n, t } = useTranslation('screens') const dispatch = useAppDispatch() const instanceActive = useSelector(getInstanceActive) const { colors, theme } = useTheme() @@ -320,7 +321,7 @@ const Screens: React.FC = ({ localCorrupt }) => { }, []) return ( - <> + = ({ localCorrupt }) => { - + ) } diff --git a/src/components/Timeline/Default.tsx b/src/components/Timeline/Default.tsx index 3605f240..cba31325 100644 --- a/src/components/Timeline/Default.tsx +++ b/src/components/Timeline/Default.tsx @@ -156,6 +156,7 @@ const TimelineDefault = React.memo( rootQueryKey={rootQueryKey} highlighted={highlighted} status={actualStatus} + ownAccount={ownAccount} accts={uniqBy( ( [actualStatus.account] as Mastodon.Account[] & diff --git a/src/components/Timeline/Shared/Actions.tsx b/src/components/Timeline/Shared/Actions.tsx index 51c65848..654c47ec 100644 --- a/src/components/Timeline/Shared/Actions.tsx +++ b/src/components/Timeline/Shared/Actions.tsx @@ -22,6 +22,7 @@ export interface Props { rootQueryKey?: QueryKeyTimeline highlighted: boolean status: Mastodon.Status + ownAccount?: boolean accts: Mastodon.Account['acct'][] // When replying to conversations reblog: boolean } @@ -31,6 +32,7 @@ const TimelineActions: React.FC = ({ rootQueryKey, highlighted, status, + ownAccount = false, accts, reblog }) => { @@ -207,7 +209,8 @@ const TimelineActions: React.FC = ({ = ({ {status.reblogs_count > 0 ? ( = ({ style={styles.action} onPress={onPressReblog} children={childrenReblog} - disabled={status.visibility === 'direct'} + disabled={ + status.visibility === 'direct' || + (status.visibility === 'private' && !ownAccount) + } /> { } else { Notifications.getExpoPushTokenAsync({ experienceId: '@xmflsct/tooot', - applicationId: 'com.xmflsct.tooot.app' + applicationId: 'com.xmflsct.app.tooot' }) .then(data => setPushAvailable(!!data)) .catch(() => setPushAvailable(false)) diff --git a/src/startup/sentry.ts b/src/startup/sentry.ts index 1c266aaf..507516ca 100644 --- a/src/startup/sentry.ts +++ b/src/startup/sentry.ts @@ -1,14 +1,13 @@ -import { isDevelopment } from '@utils/checkEnvironment' -import Constants from 'expo-constants' +import { isRelease } from '@utils/checkEnvironment' import * as Sentry from 'sentry-expo' import log from './log' const sentry = () => { log('log', 'Sentry', 'initializing') Sentry.init({ - dsn: Constants.manifest?.extra?.sentryDSN, - enableInExpoDevelopment: false, - debug: isDevelopment + dsn: 'https://53348b60ff844d52886e90251b3a5f41@o917354.ingest.sentry.io/6410576', + enableInExpoDevelopment: true, + debug: !isRelease }) } diff --git a/src/utils/push/useConnect.ts b/src/utils/push/useConnect.ts index dc0e862e..79f04f43 100644 --- a/src/utils/push/useConnect.ts +++ b/src/utils/push/useConnect.ts @@ -26,7 +26,7 @@ const pushUseConnect = ({ t, instances }: Params) => { : ( await Notifications.getExpoPushTokenAsync({ experienceId: '@xmflsct/tooot', - applicationId: 'com.xmflsct.tooot.app' + applicationId: 'com.xmflsct.app.tooot' }) ).data diff --git a/src/utils/slices/instances/push/register.ts b/src/utils/slices/instances/push/register.ts index 67e184fd..0db6ef44 100644 --- a/src/utils/slices/instances/push/register.ts +++ b/src/utils/slices/instances/push/register.ts @@ -3,7 +3,6 @@ import apiTooot, { TOOOT_API_DOMAIN } from '@api/tooot' import i18n from '@root/i18n/i18n' import { RootState } from '@root/store' import { getInstance, Instance } from '@utils/slices/instancesSlice' -import Constants from 'expo-constants' import * as Notifications from 'expo-notifications' import * as Random from 'expo-random' import { Platform } from 'react-native' @@ -57,7 +56,7 @@ const pushRegister = async ( formData.append('subscription[endpoint]', endpoint) formData.append( 'subscription[keys][p256dh]', - Constants.manifest?.extra?.toootPushKeyPublic + 'BMn2PLpZrMefG981elzG6SB1EY9gU7QZwmtZ/a/J2vUeWG+zXgeskMPwHh4T/bxsD4l7/8QT94F57CbZqYRRfJo=' ) formData.append('subscription[keys][auth]', auth) Object.keys(alerts).map(key => diff --git a/src/utils/slices/instances/updatePush.ts b/src/utils/slices/instances/updatePush.ts index 9930acd8..a477a100 100644 --- a/src/utils/slices/instances/updatePush.ts +++ b/src/utils/slices/instances/updatePush.ts @@ -18,7 +18,7 @@ export const updateInstancePush = createAsyncThunk( : ( await Notifications.getExpoPushTokenAsync({ experienceId: '@xmflsct/tooot', - applicationId: 'com.xmflsct.tooot.app' + applicationId: 'com.xmflsct.app.tooot' }) ).data diff --git a/src/utils/slices/instances/updatePushDecode.ts b/src/utils/slices/instances/updatePushDecode.ts index c8c6a4a0..a0c5b898 100644 --- a/src/utils/slices/instances/updatePushDecode.ts +++ b/src/utils/slices/instances/updatePushDecode.ts @@ -25,7 +25,7 @@ export const updateInstancePushDecode = createAsyncThunk( : ( await Notifications.getExpoPushTokenAsync({ experienceId: '@xmflsct/tooot', - applicationId: 'com.xmflsct.tooot.app' + applicationId: 'com.xmflsct.app.tooot' }) ).data