From beb7ba9dc2b04693133f985d445db2ede4db1447 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Fri, 11 Nov 2022 15:53:30 -0500 Subject: [PATCH] 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> --- android/app/build.gradle | 2 +- src/screens/Actions/Account.tsx | 8 +++--- src/screens/Announcements.tsx | 4 +-- src/screens/Compose/EditAttachment/Image.tsx | 26 +++++++++---------- src/screens/Tabs.tsx | 4 +-- src/startup/netInfo.ts | 2 +- src/utils/push/useConnect.ts | 4 +-- .../timeline/updateStatusProperty.ts | 4 +-- src/utils/slices/appSlice.ts | 8 +++--- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index b3efde33..a2231784 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -307,7 +307,7 @@ dependencies { if (isNewArchitectureEnabled()) { // If new architecture is enabled, we let you build RN from source // 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 { resolutionStrategy.dependencySubstitution { substitute(module("com.facebook.react:react-native")) diff --git a/src/screens/Actions/Account.tsx b/src/screens/Actions/Account.tsx index 492301f0..fc908d55 100644 --- a/src/screens/Actions/Account.tsx +++ b/src/screens/Actions/Account.tsx @@ -28,7 +28,7 @@ const ActionsAccount: React.FC = ({ const { t } = useTranslation('componentTimeline') const queryClient = useQueryClient() - const mutateion = useTimelineMutation({ + const mutation = useTimelineMutation({ onSuccess: (_, params) => { const theParams = params as MutationVarsTimelineUpdateAccountProperty displayMessage({ @@ -78,7 +78,7 @@ const ActionsAccount: React.FC = ({ page: queryKey && queryKey[1].page }) dismiss() - mutateion.mutate({ + mutation.mutate({ type: 'updateAccountProperty', queryKey, id: account.id, @@ -96,7 +96,7 @@ const ActionsAccount: React.FC = ({ page: queryKey && queryKey[1].page }) dismiss() - mutateion.mutate({ + mutation.mutate({ type: 'updateAccountProperty', queryKey, id: account.id, @@ -114,7 +114,7 @@ const ActionsAccount: React.FC = ({ page: queryKey && queryKey[1].page }) dismiss() - mutateion.mutate({ + mutation.mutate({ type: 'updateAccountProperty', queryKey, id: account.id, diff --git a/src/screens/Announcements.tsx b/src/screens/Announcements.tsx index 2b04312b..882a56e8 100644 --- a/src/screens/Announcements.tsx +++ b/src/screens/Announcements.tsx @@ -144,7 +144,7 @@ const ScreenAnnouncements: React.FC< : colors.backgroundDefault }} onPress={() => { - analytics('accnouncement_reaction_press', { + analytics('announcement_reaction_press', { current: reaction.me }) mutation.mutate({ @@ -203,7 +203,7 @@ const ScreenAnnouncements: React.FC< loading={mutation.isLoading} disabled={item.read} onPress={() => { - analytics('accnouncement_read_press') + analytics('announcement_read_press') !item.read && mutation.mutate({ id: item.id, diff --git a/src/screens/Compose/EditAttachment/Image.tsx b/src/screens/Compose/EditAttachment/Image.tsx index 343d1a42..05f0236f 100644 --- a/src/screens/Compose/EditAttachment/Image.tsx +++ b/src/screens/Compose/EditAttachment/Image.tsx @@ -34,7 +34,7 @@ const ComposeEditAttachmentImage: React.FC = ({ index }) => { theAttachmentRemote?.meta?.original?.aspect < 1 ? windowWidth * theAttachmentRemote?.meta?.original?.aspect : windowWidth - const imageDimensionis = { + const imageDimensions = { width: imageWidthBase, height: imageWidthBase / @@ -60,11 +60,11 @@ const ComposeEditAttachmentImage: React.FC = ({ index }) => { const pan = useSharedValue({ x: (((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.focus?.x || 0) * - imageDimensionis.width) / + imageDimensions.width) / 2, y: (((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.focus?.y || 0) * - imageDimensionis.height) / + imageDimensions.height) / 2 }) const start = useSharedValue({ x: 0, y: 0 }) @@ -80,8 +80,8 @@ const ComposeEditAttachmentImage: React.FC = ({ index }) => { }) .onEnd(() => { runOnJS(updateFocus)({ - x: pan.value.x / (imageDimensionis.width / 2), - y: pan.value.y / (imageDimensionis.height / 2) + x: pan.value.x / (imageDimensions.width / 2), + y: pan.value.y / (imageDimensions.height / 2) }) }) .onFinalize(() => { @@ -93,16 +93,16 @@ const ComposeEditAttachmentImage: React.FC = ({ index }) => { { translateX: interpolate( pan.value.x, - [-imageDimensionis.width / 2, imageDimensionis.width / 2], - [-imageDimensionis.width / 2, imageDimensionis.width / 2], + [-imageDimensions.width / 2, imageDimensions.width / 2], + [-imageDimensions.width / 2, imageDimensions.width / 2], Extrapolate.CLAMP ) }, { translateY: interpolate( pan.value.y, - [-imageDimensionis.height / 2, imageDimensionis.height / 2], - [-imageDimensionis.height / 2, imageDimensionis.height / 2], + [-imageDimensions.height / 2, imageDimensions.height / 2], + [-imageDimensions.height / 2, imageDimensions.height / 2], Extrapolate.CLAMP ) } @@ -115,8 +115,8 @@ const ComposeEditAttachmentImage: React.FC = ({ index }) => { = ({ index }) => { styleTransform, { width: windowWidth * 2, - height: imageDimensionis.height * 2, + height: imageDimensions.height * 2, position: 'absolute', left: -windowWidth / 2, - top: -imageDimensionis.height / 2, + top: -imageDimensions.height / 2, backgroundColor: colors.backgroundOverlayInvert, flexDirection: 'row', alignItems: 'center', diff --git a/src/screens/Tabs.tsx b/src/screens/Tabs.tsx index 6efb3266..d8f50cc9 100644 --- a/src/screens/Tabs.tsx +++ b/src/screens/Tabs.tsx @@ -12,7 +12,7 @@ import { getInstanceAccount, getInstanceActive } 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 React, { useCallback, useEffect, useMemo } from 'react' import { Platform } from 'react-native' @@ -64,7 +64,7 @@ const ScreenTabs = React.memo( const versionUpdate = useSelector(getVersionUpdate) const dispatch = useAppDispatch() useEffect(() => { - dispatch(retriveVersionLatest()) + dispatch(retrieveVersionLatest()) }, []) const tabMeOptions = useMemo(() => { if (versionUpdate) { diff --git a/src/startup/netInfo.ts b/src/startup/netInfo.ts index 21188668..d7b25185 100644 --- a/src/startup/netInfo.ts +++ b/src/startup/netInfo.ts @@ -51,7 +51,7 @@ const netInfo = async (): Promise<{ if (resVerify.id !== instance.account.id) { log('error', 'netInfo', 'local id does not match remote id') store.dispatch(removeInstance(instance)) - return Promise.resolve({ connected: true, corruputed: '' }) + return Promise.resolve({ connected: true, corrupted: '' }) } else { store.dispatch( updateInstanceAccount({ diff --git a/src/utils/push/useConnect.ts b/src/utils/push/useConnect.ts index c8da7fbc..a5cd8f45 100644 --- a/src/utils/push/useConnect.ts +++ b/src/utils/push/useConnect.ts @@ -4,7 +4,7 @@ import { displayMessage } from '@components/Message' import navigationRef from '@helpers/navigationRef' import { useAppDispatch } from '@root/store' 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 { useTheme } from '@utils/styles/ThemeManager' import * as Notifications from 'expo-notifications' @@ -22,7 +22,7 @@ const pushUseConnect = ({ t, instances }: Params) => { const dispatch = useAppDispatch() const { theme } = useTheme() useEffect(() => { - dispatch(retriveExpoToken()) + dispatch(retrieveExpoToken()) }, []) const expoToken = useSelector(getExpoToken) diff --git a/src/utils/queryHooks/timeline/updateStatusProperty.ts b/src/utils/queryHooks/timeline/updateStatusProperty.ts index 2a697404..85d5e166 100644 --- a/src/utils/queryHooks/timeline/updateStatusProperty.ts +++ b/src/utils/queryHooks/timeline/updateStatusProperty.ts @@ -54,7 +54,7 @@ const updateStatusProperty = ({ const tootIndex = reblog ? items.findIndex(({ reblog }) => reblog?.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) { foundToot = true updateStatus({ item: items[tootIndex], reblog, payload }) @@ -111,7 +111,7 @@ const updateStatusProperty = ({ const tootIndex = reblog ? items.findIndex(({ reblog }) => reblog?.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) { foundToot = true updateStatus({ item: items[tootIndex], reblog, payload }) diff --git a/src/utils/slices/appSlice.ts b/src/utils/slices/appSlice.ts index 09eb3ec7..19dcf27a 100644 --- a/src/utils/slices/appSlice.ts +++ b/src/utils/slices/appSlice.ts @@ -5,7 +5,7 @@ import { isDevelopment } from '@utils/checkEnvironment' import Constants from 'expo-constants' import * as Notifications from 'expo-notifications' -export const retriveExpoToken = createAsyncThunk( +export const retrieveExpoToken = createAsyncThunk( 'app/expoToken', async (): Promise => { if (isDevelopment) { @@ -20,7 +20,7 @@ export const retriveExpoToken = createAsyncThunk( } ) -export const retriveVersionLatest = createAsyncThunk( +export const retrieveVersionLatest = createAsyncThunk( 'app/versionUpdate', async (): Promise => { const res = await apiGeneral<{ latest: string }>({ @@ -48,12 +48,12 @@ const appSlice = createSlice({ reducers: {}, extraReducers: builder => { builder - .addCase(retriveExpoToken.fulfilled, (state, action) => { + .addCase(retrieveExpoToken.fulfilled, (state, action) => { if (action.payload) { state.expoToken = action.payload } }) - .addCase(retriveVersionLatest.fulfilled, (state, action) => { + .addCase(retrieveVersionLatest.fulfilled, (state, action) => { if (action.payload && Constants.expoConfig?.version) { if ( parseFloat(action.payload) > parseFloat(Constants.expoConfig?.version)