mirror of
https://github.com/tooot-app/app
synced 2025-04-15 10:47:46 +02:00
parent
4d7606cd53
commit
c8c3adf088
@ -5,8 +5,8 @@ import { HeaderLeft, HeaderRight } from '@components/Header'
|
|||||||
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
||||||
import haptics from '@root/components/haptics'
|
import haptics from '@root/components/haptics'
|
||||||
import { useAppDispatch } from '@root/store'
|
import { useAppDispatch } from '@root/store'
|
||||||
import formatText from '@screens/Compose/formatText'
|
|
||||||
import ComposeRoot from '@screens/Compose/Root'
|
import ComposeRoot from '@screens/Compose/Root'
|
||||||
|
import formatText from '@screens/Compose/utils/formatText'
|
||||||
import * as Sentry from '@sentry/react-native'
|
import * as Sentry from '@sentry/react-native'
|
||||||
import { RootStackScreenProps } from '@utils/navigation/navigators'
|
import { RootStackScreenProps } from '@utils/navigation/navigators'
|
||||||
import { useTimelineMutation } from '@utils/queryHooks/timeline'
|
import { useTimelineMutation } from '@utils/queryHooks/timeline'
|
||||||
|
@ -14,8 +14,8 @@ import { Dimensions, Image, Modal, Platform, Pressable, View } from 'react-nativ
|
|||||||
import { PanGestureHandler } from 'react-native-gesture-handler'
|
import { PanGestureHandler } from 'react-native-gesture-handler'
|
||||||
import { SwipeListView } from 'react-native-swipe-list-view'
|
import { SwipeListView } from 'react-native-swipe-list-view'
|
||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
import formatText from '../formatText'
|
|
||||||
import ComposeContext from '../utils/createContext'
|
import ComposeContext from '../utils/createContext'
|
||||||
|
import formatText from '../utils/formatText'
|
||||||
import { ComposeStateDraft, ExtendedAttachment } from '../utils/types'
|
import { ComposeStateDraft, ExtendedAttachment } from '../utils/types'
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
@ -7,8 +7,8 @@ import React, { useContext } from 'react'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { TextInput } from 'react-native'
|
import { TextInput } from 'react-native'
|
||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
import formatText from '../../formatText'
|
|
||||||
import ComposeContext from '../../utils/createContext'
|
import ComposeContext from '../../utils/createContext'
|
||||||
|
import formatText from '../../utils/formatText'
|
||||||
|
|
||||||
const ComposeSpoilerInput: React.FC = () => {
|
const ComposeSpoilerInput: React.FC = () => {
|
||||||
const { composeState, composeDispatch } = useContext(ComposeContext)
|
const { composeState, composeDispatch } = useContext(ComposeContext)
|
||||||
|
@ -9,8 +9,8 @@ import React, { useContext } from 'react'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Alert } from 'react-native'
|
import { Alert } from 'react-native'
|
||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
import formatText from '../../formatText'
|
|
||||||
import ComposeContext from '../../utils/createContext'
|
import ComposeContext from '../../utils/createContext'
|
||||||
|
import formatText from '../../utils/formatText'
|
||||||
import { uploadAttachment } from '../Footer/addAttachment'
|
import { uploadAttachment } from '../Footer/addAttachment'
|
||||||
|
|
||||||
const ComposeTextInput: React.FC = () => {
|
const ComposeTextInput: React.FC = () => {
|
||||||
|
@ -3,8 +3,8 @@ import analytics from '@components/analytics'
|
|||||||
import haptics from '@components/haptics'
|
import haptics from '@components/haptics'
|
||||||
import ComponentHashtag from '@components/Hashtag'
|
import ComponentHashtag from '@components/Hashtag'
|
||||||
import React, { useContext, useEffect } from 'react'
|
import React, { useContext, useEffect } from 'react'
|
||||||
import formatText from '../formatText'
|
|
||||||
import ComposeContext from '../utils/createContext'
|
import ComposeContext from '../utils/createContext'
|
||||||
|
import formatText from '../utils/formatText'
|
||||||
|
|
||||||
type Props = { item: Mastodon.Account & Mastodon.Tag }
|
type Props = { item: Mastodon.Account & Mastodon.Tag }
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ import { debounce, differenceWith, isEqual } from 'lodash'
|
|||||||
import React, { Dispatch } from 'react'
|
import React, { Dispatch } from 'react'
|
||||||
import { FetchOptions } from 'react-query/types/core/query'
|
import { FetchOptions } from 'react-query/types/core/query'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import { ComposeAction, ComposeState } from './utils/types'
|
import { ComposeAction, ComposeState } from './types'
|
||||||
import { instanceConfigurationStatusCharsURL } from './Root'
|
import { instanceConfigurationStatusCharsURL } from '../Root'
|
||||||
import CustomText from '@components/Text'
|
import CustomText from '@components/Text'
|
||||||
import { emojis } from '@components/Emojis'
|
import { emojis } from '@components/Emojis'
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ linkify
|
|||||||
var tail = text.slice(pos)
|
var tail = text.slice(pos)
|
||||||
|
|
||||||
if (!self.re.hashtag) {
|
if (!self.re.hashtag) {
|
||||||
self.re.hashtag = new RegExp('^[A-Za-z0-9_]+')
|
self.re.hashtag = new RegExp('^[\\S]+')
|
||||||
}
|
}
|
||||||
if (self.re.hashtag.test(tail)) {
|
if (self.re.hashtag.test(tail)) {
|
||||||
return tail.match(self.re.hashtag)![0].length
|
return tail.match(self.re.hashtag)![0].length
|
Loading…
x
Reference in New Issue
Block a user