diff options
author | Hailey <me@haileyok.com> | 2024-09-27 14:01:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 14:01:57 -0700 |
commit | f68b15219fd02e23d965015201400138ed69d59d (patch) | |
tree | 1134642fff8db10b2cfca827a6c0d9cd2a4dbd5b /src/view/com/composer | |
parent | bcd096b85aee45c38de7cfbcf1115b0a544589ae (diff) | |
download | voidsky-f68b15219fd02e23d965015201400138ed69d59d.tar.zst |
Remove Segment (#5518)
Diffstat (limited to 'src/view/com/composer')
-rw-r--r-- | src/view/com/composer/Composer.tsx | 10 | ||||
-rw-r--r-- | src/view/com/composer/photos/OpenCameraBtn.tsx | 4 | ||||
-rw-r--r-- | src/view/com/composer/photos/SelectPhotoBtn.tsx | 6 | ||||
-rw-r--r-- | src/view/com/composer/threadgate/ThreadgateBtn.tsx | 3 |
4 files changed, 2 insertions, 21 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 49ce0d442..ade37af1b 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -45,7 +45,6 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useAnalytics} from '#/lib/analytics/analytics' import * as apilib from '#/lib/api/index' import {until} from '#/lib/async/until' import {MAX_GRAPHEME_LENGTH} from '#/lib/constants' @@ -147,7 +146,6 @@ export const ComposePost = ({ const {data: currentProfile} = useProfileQuery({did: currentAccount!.did}) const {isModalActive} = useModals() const {closeComposer} = useComposerControls() - const {track} = useAnalytics() const pal = usePalette('default') const {isMobile} = useWebMediaQueries() const {_} = useLingui() @@ -310,7 +308,6 @@ export const ComposePost = ({ const onPhotoPasted = useCallback( async (uri: string) => { - track('Composer:PastedPhotos') if (uri.startsWith('data:video/')) { selectVideo({uri, type: 'video', height: 0, width: 0}) } else { @@ -318,7 +315,7 @@ export const ComposePost = ({ onImageAdd([res]) } }, - [track, selectVideo, onImageAdd], + [selectVideo, onImageAdd], ) const isAltTextRequiredAndMissing = useMemo(() => { @@ -446,10 +443,6 @@ export const ComposePost = ({ logContext: 'Composer', }) } - track('Create Post', { - imageCount: images.length, - }) - if (replyTo && replyTo.uri) track('Post:Reply') } if (postUri && !replyTo) { emitPostCreated() @@ -499,7 +492,6 @@ export const ComposePost = ({ setExtLink, setLangPrefs, threadgateAllowUISettings, - track, videoAltText, videoUploadState.asset, videoUploadState.pendingPublish, diff --git a/src/view/com/composer/photos/OpenCameraBtn.tsx b/src/view/com/composer/photos/OpenCameraBtn.tsx index 2183ca790..79d59a92d 100644 --- a/src/view/com/composer/photos/OpenCameraBtn.tsx +++ b/src/view/com/composer/photos/OpenCameraBtn.tsx @@ -3,7 +3,6 @@ import * as MediaLibrary from 'expo-media-library' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useAnalytics} from '#/lib/analytics/analytics' import {POST_IMG_MAX} from '#/lib/constants' import {useCameraPermission} from '#/lib/hooks/usePermissions' import {openCamera} from '#/lib/media/picker' @@ -20,7 +19,6 @@ type Props = { } export function OpenCameraBtn({disabled, onAdd}: Props) { - const {track} = useAnalytics() const {_} = useLingui() const {requestCameraAccessIfNeeded} = useCameraPermission() const [mediaPermissionRes, requestMediaPermission] = @@ -28,7 +26,6 @@ export function OpenCameraBtn({disabled, onAdd}: Props) { const t = useTheme() const onPressTakePicture = useCallback(async () => { - track('Composer:CameraOpened') try { if (!(await requestCameraAccessIfNeeded())) { return @@ -58,7 +55,6 @@ export function OpenCameraBtn({disabled, onAdd}: Props) { } }, [ onAdd, - track, requestCameraAccessIfNeeded, mediaPermissionRes, requestMediaPermission, diff --git a/src/view/com/composer/photos/SelectPhotoBtn.tsx b/src/view/com/composer/photos/SelectPhotoBtn.tsx index 95d2df022..34ead3d9a 100644 --- a/src/view/com/composer/photos/SelectPhotoBtn.tsx +++ b/src/view/com/composer/photos/SelectPhotoBtn.tsx @@ -3,7 +3,6 @@ import React, {useCallback} from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useAnalytics} from '#/lib/analytics/analytics' import {usePhotoLibraryPermission} from '#/lib/hooks/usePermissions' import {openPicker} from '#/lib/media/picker' import {isNative} from '#/platform/detection' @@ -19,14 +18,11 @@ type Props = { } export function SelectPhotoBtn({size, disabled, onAdd}: Props) { - const {track} = useAnalytics() const {_} = useLingui() const {requestPhotoAccessIfNeeded} = usePhotoLibraryPermission() const t = useTheme() const onPressSelectPhotos = useCallback(async () => { - track('Composer:GalleryOpened') - if (isNative && !(await requestPhotoAccessIfNeeded())) { return } @@ -41,7 +37,7 @@ export function SelectPhotoBtn({size, disabled, onAdd}: Props) { ) onAdd(results) - }, [track, requestPhotoAccessIfNeeded, size, onAdd]) + }, [requestPhotoAccessIfNeeded, size, onAdd]) return ( <Button diff --git a/src/view/com/composer/threadgate/ThreadgateBtn.tsx b/src/view/com/composer/threadgate/ThreadgateBtn.tsx index c4ce9a232..b0806180c 100644 --- a/src/view/com/composer/threadgate/ThreadgateBtn.tsx +++ b/src/view/com/composer/threadgate/ThreadgateBtn.tsx @@ -7,7 +7,6 @@ import {useLingui} from '@lingui/react' import {isNative} from '#/platform/detection' import {ThreadgateAllowUISetting} from '#/state/queries/threadgate' -import {useAnalytics} from 'lib/analytics/analytics' import {atoms as a, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' @@ -30,13 +29,11 @@ export function ThreadgateBtn({ style?: StyleProp<AnimatedStyle<ViewStyle>> }) { - const {track} = useAnalytics() const {_} = useLingui() const t = useTheme() const control = Dialog.useDialogControl() const onPress = () => { - track('Composer:ThreadgateOpened') if (isNative && Keyboard.isVisible()) { Keyboard.dismiss() } |