Android & visual fixes: color themes, repost icon, navigation, back handler, etc (#519)

* Switch android to use slide left/right animations on navigation

* Bump the repost icon down by a pixel

* Tune theme colors for contrast and darker bg on darkmode

* Move back handler to a point in the init flow that leads to more consistent capture of events

* Fix image share flow on android

* Fix lint

* Add todo about sharing not available

* Drop the android slide animation because it's too slow

* Fix 'flashes of white' in dark mode android
This commit is contained in:
Paul Frazee 2023-04-24 16:36:05 -05:00 committed by GitHub
parent 9d8600c213
commit da8af38dcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 54 additions and 36 deletions

View file

@ -32,7 +32,7 @@ export const Composer = observer(
return (
<View style={styles.mask}>
<View style={[styles.container, pal.view]}>
<View style={[styles.container, pal.view, pal.border]}>
<ComposePost
replyTo={replyTo}
quote={quote}
@ -63,5 +63,6 @@ const styles = StyleSheet.create({
paddingHorizontal: 2,
borderRadius: isMobileWeb ? 0 : 8,
marginBottom: '10vh',
borderWidth: 1,
},
})

View file

@ -13,6 +13,7 @@ import {DrawerContent} from './Drawer'
import {Composer} from './Composer'
import {useTheme} from 'lib/ThemeContext'
import {usePalette} from 'lib/hooks/usePalette'
import * as backHandler from 'lib/routes/back-handler'
import {RoutesContainer, TabsNavigator} from '../../Navigation'
import {isStateAtTabRoot} from 'lib/routes/helpers'
@ -34,6 +35,9 @@ const ShellInner = observer(() => {
[store],
)
const canGoBack = useNavigationState(state => !isStateAtTabRoot(state))
React.useEffect(() => {
backHandler.init(store)
}, [store])
return (
<>
@ -69,8 +73,8 @@ const ShellInner = observer(() => {
})
export const Shell: React.FC = observer(() => {
const theme = useTheme()
const pal = usePalette('default')
const theme = useTheme()
return (
<View testID="mobileShellView" style={[styles.outerContainer, pal.view]}>
<StatusBar style={theme.colorScheme === 'dark' ? 'light' : 'dark'} />