diff options
Diffstat (limited to 'src/view/com/composer')
-rw-r--r-- | src/view/com/composer/Composer.tsx | 32 | ||||
-rw-r--r-- | src/view/com/composer/photos/Gallery.tsx | 20 | ||||
-rw-r--r-- | src/view/com/composer/state/composer.ts | 37 | ||||
-rw-r--r-- | src/view/com/composer/text-input/web/Autocomplete.tsx | 4 |
4 files changed, 49 insertions, 44 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index de060c6c2..cc2859be9 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -518,8 +518,8 @@ export const ComposePost = ({ thread.posts.length > 1 ? _(msg`Your posts have been published`) : replyTo - ? _(msg`Your reply has been published`) - : _(msg`Your post has been published`), + ? _(msg`Your reply has been published`) + : _(msg`Your post has been published`), ) }, [ _, @@ -1000,20 +1000,20 @@ function ComposerTopBar({ }), ) : isThread - ? _( - msg({ - message: 'Publish posts', - comment: - 'Accessibility label for button to publish multiple posts in a thread', - }), - ) - : _( - msg({ - message: 'Publish post', - comment: - 'Accessibility label for button to publish a single post', - }), - ) + ? _( + msg({ + message: 'Publish posts', + comment: + 'Accessibility label for button to publish multiple posts in a thread', + }), + ) + : _( + msg({ + message: 'Publish post', + comment: + 'Accessibility label for button to publish a single post', + }), + ) } variant="solid" color="primary" diff --git a/src/view/com/composer/photos/Gallery.tsx b/src/view/com/composer/photos/Gallery.tsx index bc18c81f1..c44461b60 100644 --- a/src/view/com/composer/photos/Gallery.tsx +++ b/src/view/com/composer/photos/Gallery.tsx @@ -1,12 +1,12 @@ import React from 'react' import { - ImageStyle, + type ImageStyle, Keyboard, - LayoutChangeEvent, + type LayoutChangeEvent, StyleSheet, TouchableOpacity, View, - ViewStyle, + type ViewStyle, } from 'react-native' import {Image} from 'expo-image' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' @@ -14,14 +14,14 @@ import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' -import {Dimensions} from '#/lib/media/types' +import {type Dimensions} from '#/lib/media/types' import {colors, s} from '#/lib/styles' import {isNative} from '#/platform/detection' -import {ComposerImage, cropImage} from '#/state/gallery' +import {type ComposerImage, cropImage} from '#/state/gallery' import {Text} from '#/view/com/util/text/Text' import {useTheme} from '#/alf' import * as Dialog from '#/components/Dialog' -import {PostAction} from '../state/composer' +import {type PostAction} from '../state/composer' import {EditImageDialog} from './EditImageDialog' import {ImageAltTextDialog} from './ImageAltTextDialog' @@ -74,8 +74,8 @@ const GalleryInner = ({images, containerInfo, dispatch}: GalleryInnerProps) => { altTextControlStyle: isOverflow ? {left: 4, bottom: 4} : !isMobile && images.length < 3 - ? {left: 8, top: 8} - : {left: 4, top: 4}, + ? {left: 8, top: 8} + : {left: 4, top: 4}, imageControlsStyle: { display: 'flex' as const, flexDirection: 'row' as const, @@ -83,8 +83,8 @@ const GalleryInner = ({images, containerInfo, dispatch}: GalleryInnerProps) => { ...(isOverflow ? {top: 4, right: 4, gap: 4} : !isMobile && images.length < 3 - ? {top: 8, right: 8, gap: 8} - : {top: 4, right: 4, gap: 4}), + ? {top: 8, right: 8, gap: 8} + : {top: 4, right: 4, gap: 4}), zIndex: 1, }, imageStyle: { diff --git a/src/view/com/composer/state/composer.ts b/src/view/com/composer/state/composer.ts index f5a55f175..c673f2134 100644 --- a/src/view/com/composer/state/composer.ts +++ b/src/view/com/composer/state/composer.ts @@ -1,13 +1,13 @@ -import {ImagePickerAsset} from 'expo-image-picker' +import {type ImagePickerAsset} from 'expo-image-picker' import { - AppBskyFeedPostgate, + type AppBskyFeedPostgate, AppBskyRichtextFacet, - BskyPreferences, + type BskyPreferences, RichText, } from '@atproto/api' import {nanoid} from 'nanoid/non-secure' -import {SelfLabel} from '#/lib/moderation' +import {type SelfLabel} from '#/lib/moderation' import {insertMentionAt} from '#/lib/strings/mention-manip' import {shortenLinks} from '#/lib/strings/rich-text-manip' import { @@ -15,17 +15,22 @@ import { postUriToRelativePath, toBskyAppUrl, } from '#/lib/strings/url-helpers' -import {ComposerImage, createInitialImages} from '#/state/gallery' +import {type ComposerImage, createInitialImages} from '#/state/gallery' import {createPostgateRecord} from '#/state/queries/postgate/util' -import {Gif} from '#/state/queries/tenor' +import {type Gif} from '#/state/queries/tenor' import {threadgateRecordToAllowUISetting} from '#/state/queries/threadgate' -import {ThreadgateAllowUISetting} from '#/state/queries/threadgate' -import {ComposerOpts} from '#/state/shell/composer' +import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate' +import {type ComposerOpts} from '#/state/shell/composer' import { - LinkFacetMatch, + type LinkFacetMatch, suggestLinkCardUri, } from '#/view/com/composer/text-input/text-input-util' -import {createVideoState, VideoAction, videoReducer, VideoState} from './video' +import { + createVideoState, + type VideoAction, + videoReducer, + type VideoState, +} from './video' type ImagesMedia = { type: 'images' @@ -514,12 +519,12 @@ export function createComposerState({ text: initText ? initText : initMention - ? insertMentionAt( - `@${initMention}`, - initMention.length + 1, - `${initMention}`, - ) - : '', + ? insertMentionAt( + `@${initMention}`, + initMention.length + 1, + `${initMention}`, + ) + : '', }) let link: Link | undefined diff --git a/src/view/com/composer/text-input/web/Autocomplete.tsx b/src/view/com/composer/text-input/web/Autocomplete.tsx index 62f19c63d..94ecb53cc 100644 --- a/src/view/com/composer/text-input/web/Autocomplete.tsx +++ b/src/view/com/composer/text-input/web/Autocomplete.tsx @@ -209,8 +209,8 @@ function AutocompleteProfileCard({ itemIndex === 0 ? styles.firstMention : itemIndex === totalItems - 1 - ? styles.lastMention - : undefined, + ? styles.lastMention + : undefined, ]} onPress={onPress} accessibilityRole="button"> |