1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Add back disabled color

This commit is contained in:
Zhiyuan Zheng
2020-12-26 14:40:10 +01:00
parent 7a15cceb28
commit 3ea88d025b
12 changed files with 37 additions and 69 deletions

View File

@ -171,7 +171,7 @@ export const Index: React.FC<Props> = ({ localCorrupt }) => {
})}
tabBarOptions={{
activeTintColor: theme.primary,
inactiveTintColor: theme.secondary,
inactiveTintColor: localInstance ? theme.secondary : theme.disabled,
showLabel: false
}}
>
@ -182,11 +182,6 @@ export const Index: React.FC<Props> = ({ localCorrupt }) => {
tabPress: e => {
if (!localInstance) {
e.preventDefault()
toast({
type: 'error',
content: '请先登录',
onHide: () => navigation.navigate('Screen-Me')
})
}
}
})}
@ -201,12 +196,6 @@ export const Index: React.FC<Props> = ({ localCorrupt }) => {
navigation.navigate(getCurrentTab(navigation), {
screen: 'Screen-Shared-Compose'
})
} else {
toast({
type: 'error',
content: '请先登录',
onHide: () => navigation.navigate('Screen-Me')
})
}
}
})}
@ -224,15 +213,10 @@ export const Index: React.FC<Props> = ({ localCorrupt }) => {
backgroundColor: theme.red
}
}}
listeners={({ navigation }) => ({
listeners={() => ({
tabPress: e => {
if (!localInstance) {
e.preventDefault()
toast({
type: 'error',
content: '请先登录',
onHide: () => navigation.navigate('Screen-Me')
})
}
}
})}