1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2022-06-02 00:28:42 +02:00
parent bc0ae827ad
commit bee856fa34
3 changed files with 21 additions and 9 deletions

View File

@ -5,7 +5,7 @@ import { StyleConstants } from '@utils/styles/constants'
import { adaptiveScale } from '@utils/styles/scaling' import { adaptiveScale } from '@utils/styles/scaling'
import { useTheme } from '@utils/styles/ThemeManager' import { useTheme } from '@utils/styles/ThemeManager'
import React, { useMemo } from 'react' import React, { useMemo } from 'react'
import { StyleSheet } from 'react-native' import { Platform, StyleSheet } from 'react-native'
import FastImage from 'react-native-fast-image' import FastImage from 'react-native-fast-image'
import { useSelector } from 'react-redux' import { useSelector } from 'react-redux'
import validUrl from 'valid-url' import validUrl from 'valid-url'
@ -51,8 +51,14 @@ const ParseEmojis = React.memo(
image: { image: {
width: adaptedFontsize, width: adaptedFontsize,
height: adaptedFontsize, height: adaptedFontsize,
...(Platform.OS === 'ios'
? {
transform: [{ translateY: -2 }] transform: [{ translateY: -2 }]
} }
: {
transform: [{ translateY: 1 }]
})
}
}) })
}, [theme, adaptiveFontsize]) }, [theme, adaptiveFontsize])

View File

@ -13,7 +13,7 @@ import { adaptiveScale } from '@utils/styles/scaling'
import { useTheme } from '@utils/styles/ThemeManager' import { useTheme } from '@utils/styles/ThemeManager'
import React, { useCallback, useState } from 'react' import React, { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { Pressable, View } from 'react-native' import { Platform, Pressable, View } from 'react-native'
import HTMLView from 'react-native-htmlview' import HTMLView from 'react-native-htmlview'
import { useSelector } from 'react-redux' import { useSelector } from 'react-redux'
@ -139,7 +139,13 @@ const renderNode = ({
name='ExternalLink' name='ExternalLink'
size={adaptedFontsize} size={adaptedFontsize}
style={{ style={{
...(Platform.OS === 'ios'
? {
transform: [{ translateY: -2 }] transform: [{ translateY: -2 }]
}
: {
transform: [{ translateY: 1 }]
})
}} }}
/> />
) : null} ) : null}

View File

@ -100,8 +100,8 @@ const ComposeEmojis: React.FC<Props> = ({ accessibleRefEmojis }) => {
)} )}
source={{ uri }} source={{ uri }}
style={{ style={{
width: 32, width: 36,
height: 32, height: 36,
padding: StyleConstants.Spacing.S, padding: StyleConstants.Spacing.S,
margin: StyleConstants.Spacing.S margin: StyleConstants.Spacing.S
}} }}
@ -119,8 +119,8 @@ const ComposeEmojis: React.FC<Props> = ({ accessibleRefEmojis }) => {
)} )}
source={{ uri }} source={{ uri }}
style={{ style={{
width: 32, width: 36,
height: 32, height: 36,
padding: StyleConstants.Spacing.S, padding: StyleConstants.Spacing.S,
margin: StyleConstants.Spacing.S margin: StyleConstants.Spacing.S
}} }}
@ -145,7 +145,7 @@ const ComposeEmojis: React.FC<Props> = ({ accessibleRefEmojis }) => {
flexDirection: 'row', flexDirection: 'row',
flexWrap: 'wrap', flexWrap: 'wrap',
justifyContent: 'space-around', justifyContent: 'space-around',
height: 260 height: 280
}} }}
> >
<SectionList <SectionList