1
0
mirror of https://github.com/tooot-app/app synced 2025-04-24 15:08:51 +02:00

Merge branch 'main' into candidate

This commit is contained in:
Zhiyuan Zheng 2021-05-27 10:40:29 +02:00
commit b4b15c3740
2 changed files with 59 additions and 46 deletions

View File

@ -4,7 +4,7 @@
"native": "210511", "native": "210511",
"major": 2, "major": 2,
"minor": 0, "minor": 0,
"patch": 0, "patch": 1,
"expo": "41.0.0" "expo": "41.0.0"
}, },
"description": "tooot app for Mastodon", "description": "tooot app for Mastodon",

View File

@ -13,7 +13,13 @@ import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager' import { useTheme } from '@utils/styles/ThemeManager'
import React, { useRef } from 'react' import React, { useRef } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { StyleSheet, Text, View } from 'react-native' import {
KeyboardAvoidingView,
Platform,
StyleSheet,
Text,
View
} from 'react-native'
import { ScrollView } from 'react-native-gesture-handler' import { ScrollView } from 'react-native-gesture-handler'
import { useQueryClient } from 'react-query' import { useQueryClient } from 'react-query'
import { useDispatch, useSelector } from 'react-redux' import { useDispatch, useSelector } from 'react-redux'
@ -56,12 +62,18 @@ const TabMeSwitch: React.FC = () => {
const scrollViewRef = useRef<ScrollView>(null) const scrollViewRef = useRef<ScrollView>(null)
return ( return (
<KeyboardAvoidingView
style={{ flex: 1 }}
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
>
<ScrollView <ScrollView
ref={scrollViewRef} ref={scrollViewRef}
style={styles.base} style={styles.base}
keyboardShouldPersistTaps='always' keyboardShouldPersistTaps='always'
> >
<View style={[styles.firstSection, { borderBottomColor: theme.border }]}> <View
style={[styles.firstSection, { borderBottomColor: theme.border }]}
>
<Text style={[styles.header, { color: theme.primaryDefault }]}> <Text style={[styles.header, { color: theme.primaryDefault }]}>
{t('me.switch.existing')} {t('me.switch.existing')}
</Text> </Text>
@ -103,12 +115,13 @@ const TabMeSwitch: React.FC = () => {
/> />
</View> </View>
</ScrollView> </ScrollView>
</KeyboardAvoidingView>
) )
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
base: { base: {
marginBottom: StyleConstants.Spacing.L marginBottom: StyleConstants.Spacing.L * 2
}, },
header: { header: {
...StyleConstants.FontStyle.M, ...StyleConstants.FontStyle.M,