1
0
mirror of https://github.com/tooot-app/app synced 2025-01-03 13:10:23 +01:00

Fix Android bugs

This commit is contained in:
xmflsct 2023-01-08 00:05:58 +01:00
parent 2d9dc00683
commit fb3f2e82d6
2 changed files with 19 additions and 7 deletions

View File

@ -49,10 +49,10 @@ const ParseHTML: React.FC<Props> = ({
StyleConstants.Font.Size[size],
adaptiveSize ? adaptiveFontsize : 0
)
const adaptedLineheight = adaptiveScale(
StyleConstants.Font.LineHeight[size],
adaptiveSize ? adaptiveFontsize : 0
)
const adaptedLineheight =
Platform.OS === 'ios'
? adaptiveScale(StyleConstants.Font.LineHeight[size], adaptiveSize ? adaptiveFontsize : 0)
: undefined
const navigation = useNavigation<StackNavigationProp<TabLocalStackParamList>>()
const { params } = useRoute()
@ -203,7 +203,10 @@ const ParseHTML: React.FC<Props> = ({
break
case 'br':
return (
<Text key={index} style={{ lineHeight: adaptedLineheight / 2 }}>
<Text
key={index}
style={{ lineHeight: adaptedLineheight ? adaptedLineheight / 2 : undefined }}
>
{'\n'}
</Text>
)
@ -212,7 +215,11 @@ const ParseHTML: React.FC<Props> = ({
return (
<Text key={index}>
{node.children.map((c, i) => renderNode(c, i))}
<Text style={{ lineHeight: adaptedLineheight / 2 }}>{'\n\n'}</Text>
<Text
style={{ lineHeight: adaptedLineheight ? adaptedLineheight / 2 : undefined }}
>
{'\n\n'}
</Text>
</Text>
)
} else {

View File

@ -114,7 +114,12 @@ const Timeline: React.FC<Props> = ({
colors={[colors.primaryDefault]}
progressBackgroundColor={colors.backgroundDefault}
refreshing={isFetching || isLoading}
onRefresh={() => refetch()}
onRefresh={() => {
if (readMarker) {
setAccountStorage([{ key: readMarker, value: undefined }])
}
refetch()
}}
/>
)
}