mirror of
				https://github.com/tooot-app/app
				synced 2025-06-05 22:19:13 +02:00 
			
		
		
		
	Spelling (#449)
* spelling: announcement Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: corrupted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dimensions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: favourites Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: mutation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: retrieve Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: transitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
		| @@ -307,7 +307,7 @@ dependencies { | |||||||
| if (isNewArchitectureEnabled()) { | if (isNewArchitectureEnabled()) { | ||||||
|     // If new architecture is enabled, we let you build RN from source |     // If new architecture is enabled, we let you build RN from source | ||||||
|     // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. |     // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. | ||||||
|     // This will be applied to all the imported transtitive dependency. |     // This will be applied to all the imported transitive dependency. | ||||||
|     configurations.all { |     configurations.all { | ||||||
|         resolutionStrategy.dependencySubstitution { |         resolutionStrategy.dependencySubstitution { | ||||||
|             substitute(module("com.facebook.react:react-native")) |             substitute(module("com.facebook.react:react-native")) | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ const ActionsAccount: React.FC<Props> = ({ | |||||||
|   const { t } = useTranslation('componentTimeline') |   const { t } = useTranslation('componentTimeline') | ||||||
|  |  | ||||||
|   const queryClient = useQueryClient() |   const queryClient = useQueryClient() | ||||||
|   const mutateion = useTimelineMutation({ |   const mutation = useTimelineMutation({ | ||||||
|     onSuccess: (_, params) => { |     onSuccess: (_, params) => { | ||||||
|       const theParams = params as MutationVarsTimelineUpdateAccountProperty |       const theParams = params as MutationVarsTimelineUpdateAccountProperty | ||||||
|       displayMessage({ |       displayMessage({ | ||||||
| @@ -78,7 +78,7 @@ const ActionsAccount: React.FC<Props> = ({ | |||||||
|             page: queryKey && queryKey[1].page |             page: queryKey && queryKey[1].page | ||||||
|           }) |           }) | ||||||
|           dismiss() |           dismiss() | ||||||
|           mutateion.mutate({ |           mutation.mutate({ | ||||||
|             type: 'updateAccountProperty', |             type: 'updateAccountProperty', | ||||||
|             queryKey, |             queryKey, | ||||||
|             id: account.id, |             id: account.id, | ||||||
| @@ -96,7 +96,7 @@ const ActionsAccount: React.FC<Props> = ({ | |||||||
|             page: queryKey && queryKey[1].page |             page: queryKey && queryKey[1].page | ||||||
|           }) |           }) | ||||||
|           dismiss() |           dismiss() | ||||||
|           mutateion.mutate({ |           mutation.mutate({ | ||||||
|             type: 'updateAccountProperty', |             type: 'updateAccountProperty', | ||||||
|             queryKey, |             queryKey, | ||||||
|             id: account.id, |             id: account.id, | ||||||
| @@ -114,7 +114,7 @@ const ActionsAccount: React.FC<Props> = ({ | |||||||
|             page: queryKey && queryKey[1].page |             page: queryKey && queryKey[1].page | ||||||
|           }) |           }) | ||||||
|           dismiss() |           dismiss() | ||||||
|           mutateion.mutate({ |           mutation.mutate({ | ||||||
|             type: 'updateAccountProperty', |             type: 'updateAccountProperty', | ||||||
|             queryKey, |             queryKey, | ||||||
|             id: account.id, |             id: account.id, | ||||||
|   | |||||||
| @@ -144,7 +144,7 @@ const ScreenAnnouncements: React.FC< | |||||||
|                       : colors.backgroundDefault |                       : colors.backgroundDefault | ||||||
|                   }} |                   }} | ||||||
|                   onPress={() => { |                   onPress={() => { | ||||||
|                     analytics('accnouncement_reaction_press', { |                     analytics('announcement_reaction_press', { | ||||||
|                       current: reaction.me |                       current: reaction.me | ||||||
|                     }) |                     }) | ||||||
|                     mutation.mutate({ |                     mutation.mutate({ | ||||||
| @@ -203,7 +203,7 @@ const ScreenAnnouncements: React.FC< | |||||||
|             loading={mutation.isLoading} |             loading={mutation.isLoading} | ||||||
|             disabled={item.read} |             disabled={item.read} | ||||||
|             onPress={() => { |             onPress={() => { | ||||||
|               analytics('accnouncement_read_press') |               analytics('announcement_read_press') | ||||||
|               !item.read && |               !item.read && | ||||||
|                 mutation.mutate({ |                 mutation.mutate({ | ||||||
|                   id: item.id, |                   id: item.id, | ||||||
|   | |||||||
| @@ -34,7 +34,7 @@ const ComposeEditAttachmentImage: React.FC<Props> = ({ index }) => { | |||||||
|     theAttachmentRemote?.meta?.original?.aspect < 1 |     theAttachmentRemote?.meta?.original?.aspect < 1 | ||||||
|       ? windowWidth * theAttachmentRemote?.meta?.original?.aspect |       ? windowWidth * theAttachmentRemote?.meta?.original?.aspect | ||||||
|       : windowWidth |       : windowWidth | ||||||
|   const imageDimensionis = { |   const imageDimensions = { | ||||||
|     width: imageWidthBase, |     width: imageWidthBase, | ||||||
|     height: |     height: | ||||||
|       imageWidthBase / |       imageWidthBase / | ||||||
| @@ -60,11 +60,11 @@ const ComposeEditAttachmentImage: React.FC<Props> = ({ index }) => { | |||||||
|   const pan = useSharedValue({ |   const pan = useSharedValue({ | ||||||
|     x: |     x: | ||||||
|       (((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.focus?.x || 0) * |       (((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.focus?.x || 0) * | ||||||
|         imageDimensionis.width) / |         imageDimensions.width) / | ||||||
|       2, |       2, | ||||||
|     y: |     y: | ||||||
|       (((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.focus?.y || 0) * |       (((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.focus?.y || 0) * | ||||||
|         imageDimensionis.height) / |         imageDimensions.height) / | ||||||
|       2 |       2 | ||||||
|   }) |   }) | ||||||
|   const start = useSharedValue({ x: 0, y: 0 }) |   const start = useSharedValue({ x: 0, y: 0 }) | ||||||
| @@ -80,8 +80,8 @@ const ComposeEditAttachmentImage: React.FC<Props> = ({ index }) => { | |||||||
|     }) |     }) | ||||||
|     .onEnd(() => { |     .onEnd(() => { | ||||||
|       runOnJS(updateFocus)({ |       runOnJS(updateFocus)({ | ||||||
|         x: pan.value.x / (imageDimensionis.width / 2), |         x: pan.value.x / (imageDimensions.width / 2), | ||||||
|         y: pan.value.y / (imageDimensionis.height / 2) |         y: pan.value.y / (imageDimensions.height / 2) | ||||||
|       }) |       }) | ||||||
|     }) |     }) | ||||||
|     .onFinalize(() => { |     .onFinalize(() => { | ||||||
| @@ -93,16 +93,16 @@ const ComposeEditAttachmentImage: React.FC<Props> = ({ index }) => { | |||||||
|         { |         { | ||||||
|           translateX: interpolate( |           translateX: interpolate( | ||||||
|             pan.value.x, |             pan.value.x, | ||||||
|             [-imageDimensionis.width / 2, imageDimensionis.width / 2], |             [-imageDimensions.width / 2, imageDimensions.width / 2], | ||||||
|             [-imageDimensionis.width / 2, imageDimensionis.width / 2], |             [-imageDimensions.width / 2, imageDimensions.width / 2], | ||||||
|             Extrapolate.CLAMP |             Extrapolate.CLAMP | ||||||
|           ) |           ) | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           translateY: interpolate( |           translateY: interpolate( | ||||||
|             pan.value.y, |             pan.value.y, | ||||||
|             [-imageDimensionis.height / 2, imageDimensionis.height / 2], |             [-imageDimensions.height / 2, imageDimensions.height / 2], | ||||||
|             [-imageDimensionis.height / 2, imageDimensionis.height / 2], |             [-imageDimensions.height / 2, imageDimensions.height / 2], | ||||||
|             Extrapolate.CLAMP |             Extrapolate.CLAMP | ||||||
|           ) |           ) | ||||||
|         } |         } | ||||||
| @@ -115,8 +115,8 @@ const ComposeEditAttachmentImage: React.FC<Props> = ({ index }) => { | |||||||
|       <View style={{ overflow: 'hidden', flex: 1, alignItems: 'center' }}> |       <View style={{ overflow: 'hidden', flex: 1, alignItems: 'center' }}> | ||||||
|         <Image |         <Image | ||||||
|           style={{ |           style={{ | ||||||
|             width: imageDimensionis.width, |             width: imageDimensions.width, | ||||||
|             height: imageDimensionis.height |             height: imageDimensions.height | ||||||
|           }} |           }} | ||||||
|           source={{ |           source={{ | ||||||
|             uri: theAttachmentLocal?.uri ? theAttachmentLocal.uri : theAttachmentRemote?.preview_url |             uri: theAttachmentLocal?.uri ? theAttachmentLocal.uri : theAttachmentRemote?.preview_url | ||||||
| @@ -128,10 +128,10 @@ const ComposeEditAttachmentImage: React.FC<Props> = ({ index }) => { | |||||||
|               styleTransform, |               styleTransform, | ||||||
|               { |               { | ||||||
|                 width: windowWidth * 2, |                 width: windowWidth * 2, | ||||||
|                 height: imageDimensionis.height * 2, |                 height: imageDimensions.height * 2, | ||||||
|                 position: 'absolute', |                 position: 'absolute', | ||||||
|                 left: -windowWidth / 2, |                 left: -windowWidth / 2, | ||||||
|                 top: -imageDimensionis.height / 2, |                 top: -imageDimensions.height / 2, | ||||||
|                 backgroundColor: colors.backgroundOverlayInvert, |                 backgroundColor: colors.backgroundOverlayInvert, | ||||||
|                 flexDirection: 'row', |                 flexDirection: 'row', | ||||||
|                 alignItems: 'center', |                 alignItems: 'center', | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ import { | |||||||
|   getInstanceAccount, |   getInstanceAccount, | ||||||
|   getInstanceActive |   getInstanceActive | ||||||
| } from '@utils/slices/instancesSlice' | } from '@utils/slices/instancesSlice' | ||||||
| import { getVersionUpdate, retriveVersionLatest } from '@utils/slices/appSlice' | import { getVersionUpdate, retrieveVersionLatest } from '@utils/slices/appSlice' | ||||||
| import { useTheme } from '@utils/styles/ThemeManager' | import { useTheme } from '@utils/styles/ThemeManager' | ||||||
| import React, { useCallback, useEffect, useMemo } from 'react' | import React, { useCallback, useEffect, useMemo } from 'react' | ||||||
| import { Platform } from 'react-native' | import { Platform } from 'react-native' | ||||||
| @@ -64,7 +64,7 @@ const ScreenTabs = React.memo( | |||||||
|     const versionUpdate = useSelector(getVersionUpdate) |     const versionUpdate = useSelector(getVersionUpdate) | ||||||
|     const dispatch = useAppDispatch() |     const dispatch = useAppDispatch() | ||||||
|     useEffect(() => { |     useEffect(() => { | ||||||
|       dispatch(retriveVersionLatest()) |       dispatch(retrieveVersionLatest()) | ||||||
|     }, []) |     }, []) | ||||||
|     const tabMeOptions = useMemo(() => { |     const tabMeOptions = useMemo(() => { | ||||||
|       if (versionUpdate) { |       if (versionUpdate) { | ||||||
|   | |||||||
| @@ -51,7 +51,7 @@ const netInfo = async (): Promise<{ | |||||||
|       if (resVerify.id !== instance.account.id) { |       if (resVerify.id !== instance.account.id) { | ||||||
|         log('error', 'netInfo', 'local id does not match remote id') |         log('error', 'netInfo', 'local id does not match remote id') | ||||||
|         store.dispatch(removeInstance(instance)) |         store.dispatch(removeInstance(instance)) | ||||||
|         return Promise.resolve({ connected: true, corruputed: '' }) |         return Promise.resolve({ connected: true, corrupted: '' }) | ||||||
|       } else { |       } else { | ||||||
|         store.dispatch( |         store.dispatch( | ||||||
|           updateInstanceAccount({ |           updateInstanceAccount({ | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ import { displayMessage } from '@components/Message' | |||||||
| import navigationRef from '@helpers/navigationRef' | import navigationRef from '@helpers/navigationRef' | ||||||
| import { useAppDispatch } from '@root/store' | import { useAppDispatch } from '@root/store' | ||||||
| import { InstanceLatest } from '@utils/migrations/instances/migration' | import { InstanceLatest } from '@utils/migrations/instances/migration' | ||||||
| import { getExpoToken, retriveExpoToken } from '@utils/slices/appSlice' | import { getExpoToken, retrieveExpoToken } from '@utils/slices/appSlice' | ||||||
| import { disableAllPushes } from '@utils/slices/instancesSlice' | import { disableAllPushes } from '@utils/slices/instancesSlice' | ||||||
| import { useTheme } from '@utils/styles/ThemeManager' | import { useTheme } from '@utils/styles/ThemeManager' | ||||||
| import * as Notifications from 'expo-notifications' | import * as Notifications from 'expo-notifications' | ||||||
| @@ -22,7 +22,7 @@ const pushUseConnect = ({ t, instances }: Params) => { | |||||||
|   const dispatch = useAppDispatch() |   const dispatch = useAppDispatch() | ||||||
|   const { theme } = useTheme() |   const { theme } = useTheme() | ||||||
|   useEffect(() => { |   useEffect(() => { | ||||||
|     dispatch(retriveExpoToken()) |     dispatch(retrieveExpoToken()) | ||||||
|   }, []) |   }, []) | ||||||
|  |  | ||||||
|   const expoToken = useSelector(getExpoToken) |   const expoToken = useSelector(getExpoToken) | ||||||
|   | |||||||
| @@ -54,7 +54,7 @@ const updateStatusProperty = ({ | |||||||
|               const tootIndex = reblog |               const tootIndex = reblog | ||||||
|                 ? items.findIndex(({ reblog }) => reblog?.id === id) |                 ? items.findIndex(({ reblog }) => reblog?.id === id) | ||||||
|                 : items.findIndex(toot => toot.id === id) |                 : items.findIndex(toot => toot.id === id) | ||||||
|               // if favouriets page and notifications page, remove the item instead |               // if favourites page and notifications page, remove the item instead | ||||||
|               if (tootIndex >= 0) { |               if (tootIndex >= 0) { | ||||||
|                 foundToot = true |                 foundToot = true | ||||||
|                 updateStatus({ item: items[tootIndex], reblog, payload }) |                 updateStatus({ item: items[tootIndex], reblog, payload }) | ||||||
| @@ -111,7 +111,7 @@ const updateStatusProperty = ({ | |||||||
|                 const tootIndex = reblog |                 const tootIndex = reblog | ||||||
|                   ? items.findIndex(({ reblog }) => reblog?.id === id) |                   ? items.findIndex(({ reblog }) => reblog?.id === id) | ||||||
|                   : items.findIndex(toot => toot.id === id) |                   : items.findIndex(toot => toot.id === id) | ||||||
|                 // if favouriets page and notifications page, remove the item instead |                 // if favourites page and notifications page, remove the item instead | ||||||
|                 if (tootIndex >= 0) { |                 if (tootIndex >= 0) { | ||||||
|                   foundToot = true |                   foundToot = true | ||||||
|                   updateStatus({ item: items[tootIndex], reblog, payload }) |                   updateStatus({ item: items[tootIndex], reblog, payload }) | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ import { isDevelopment } from '@utils/checkEnvironment' | |||||||
| import Constants from 'expo-constants' | import Constants from 'expo-constants' | ||||||
| import * as Notifications from 'expo-notifications' | import * as Notifications from 'expo-notifications' | ||||||
|  |  | ||||||
| export const retriveExpoToken = createAsyncThunk( | export const retrieveExpoToken = createAsyncThunk( | ||||||
|   'app/expoToken', |   'app/expoToken', | ||||||
|   async (): Promise<string> => { |   async (): Promise<string> => { | ||||||
|     if (isDevelopment) { |     if (isDevelopment) { | ||||||
| @@ -20,7 +20,7 @@ export const retriveExpoToken = createAsyncThunk( | |||||||
|   } |   } | ||||||
| ) | ) | ||||||
|  |  | ||||||
| export const retriveVersionLatest = createAsyncThunk( | export const retrieveVersionLatest = createAsyncThunk( | ||||||
|   'app/versionUpdate', |   'app/versionUpdate', | ||||||
|   async (): Promise<string> => { |   async (): Promise<string> => { | ||||||
|     const res = await apiGeneral<{ latest: string }>({ |     const res = await apiGeneral<{ latest: string }>({ | ||||||
| @@ -48,12 +48,12 @@ const appSlice = createSlice({ | |||||||
|   reducers: {}, |   reducers: {}, | ||||||
|   extraReducers: builder => { |   extraReducers: builder => { | ||||||
|     builder |     builder | ||||||
|       .addCase(retriveExpoToken.fulfilled, (state, action) => { |       .addCase(retrieveExpoToken.fulfilled, (state, action) => { | ||||||
|         if (action.payload) { |         if (action.payload) { | ||||||
|           state.expoToken = action.payload |           state.expoToken = action.payload | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|       .addCase(retriveVersionLatest.fulfilled, (state, action) => { |       .addCase(retrieveVersionLatest.fulfilled, (state, action) => { | ||||||
|         if (action.payload && Constants.expoConfig?.version) { |         if (action.payload && Constants.expoConfig?.version) { | ||||||
|           if ( |           if ( | ||||||
|             parseFloat(action.payload) > parseFloat(Constants.expoConfig?.version) |             parseFloat(action.payload) > parseFloat(Constants.expoConfig?.version) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user