Tweak approach to the viewheader
This commit is contained in:
parent
ac655a0cf4
commit
a014b4e6cb
5 changed files with 15 additions and 14 deletions
|
@ -22,6 +22,7 @@ import {s} from 'lib/styles'
|
|||
import {useStores} from 'state/index'
|
||||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {useAnalytics} from 'lib/analytics'
|
||||
import {isDesktopWeb} from 'platform/detection'
|
||||
|
||||
export const FeedItem = observer(function ({
|
||||
item,
|
||||
|
@ -108,8 +109,9 @@ export const FeedItem = observer(function ({
|
|||
const isNoTop = isChild && !item._isThreadChild
|
||||
const outerStyles = [
|
||||
styles.outer,
|
||||
isDesktopWeb && styles.outerDesktopWeb,
|
||||
pal.view,
|
||||
{borderTopColor: pal.colors.border},
|
||||
{borderColor: pal.colors.border},
|
||||
isSmallTop ? styles.outerSmallTop : undefined,
|
||||
isNoTop ? styles.outerNoTop : undefined,
|
||||
item._isThreadParent ? styles.outerNoBottom : undefined,
|
||||
|
@ -273,6 +275,11 @@ const styles = StyleSheet.create({
|
|||
paddingRight: 15,
|
||||
paddingBottom: 8,
|
||||
},
|
||||
outerDesktopWeb: {
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
marginBottom: 10,
|
||||
},
|
||||
outerNoTop: {
|
||||
borderTopWidth: 0,
|
||||
paddingTop: 0,
|
||||
|
@ -282,6 +289,7 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
outerNoBottom: {
|
||||
paddingBottom: 2,
|
||||
marginBottom: 0,
|
||||
},
|
||||
topReplyLine: {
|
||||
position: 'absolute',
|
||||
|
|
|
@ -8,6 +8,7 @@ import {useStores} from 'state/index'
|
|||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {useAnimatedValue} from 'lib/hooks/useAnimatedValue'
|
||||
import {useAnalytics} from 'lib/analytics'
|
||||
import {isDesktopWeb} from '../../../platform/detection'
|
||||
|
||||
const BACK_HITSLOP = {left: 10, top: 10, right: 30, bottom: 10}
|
||||
|
||||
|
@ -33,6 +34,9 @@ export const ViewHeader = observer(function ViewHeader({
|
|||
if (typeof canGoBack === 'undefined') {
|
||||
canGoBack = store.nav.tab.canGoBack
|
||||
}
|
||||
if (isDesktopWeb) {
|
||||
return undefined
|
||||
}
|
||||
return (
|
||||
<Container hideOnScroll={hideOnScroll || false}>
|
||||
<TouchableOpacity
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
import {observer} from 'mobx-react-lite'
|
||||
|
||||
export const ViewHeader = observer(function ViewHeader(_opts: {
|
||||
title: string
|
||||
canGoBack?: boolean
|
||||
}) {
|
||||
// TODO
|
||||
return null
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue