mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
Added safearea for editor and post display screen
This commit is contained in:
parent
cc1ac43f28
commit
65c7dad230
@ -9,9 +9,10 @@ export default EStyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
width: '$deviceWidth',
|
||||
height: 50,
|
||||
shadowOpacity: 0.2,
|
||||
shadowOpacity: 0.1,
|
||||
shadowOffset: {
|
||||
height: 1.5,
|
||||
width: 0,
|
||||
height: -3,
|
||||
},
|
||||
elevation: 3,
|
||||
},
|
||||
|
@ -1,9 +1,11 @@
|
||||
import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { View, SafeAreaView } from 'react-native';
|
||||
import styles from './stickyBarStyles';
|
||||
|
||||
const StickyBar = ({ children, isFixedFooter }) => (
|
||||
<View style={[styles.container, isFixedFooter && styles.fixedFooter]}>{children}</View>
|
||||
<SafeAreaView>
|
||||
<View style={[styles.container, isFixedFooter && styles.fixedFooter]}>{children}</View>
|
||||
</SafeAreaView>
|
||||
);
|
||||
|
||||
export default StickyBar;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { PureComponent, Fragment } from 'react';
|
||||
import { View, Text, ScrollView, Dimensions } from 'react-native';
|
||||
import { View, Text, ScrollView, Dimensions, SafeAreaView } from 'react-native';
|
||||
import { injectIntl } from 'react-intl';
|
||||
import get from 'lodash/get';
|
||||
import ActionSheet from 'react-native-actionsheet';
|
||||
@ -77,68 +77,70 @@ class PostDisplayView extends PureComponent {
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<StickyBar isFixedFooter={isFixedFooter}>
|
||||
<View style={styles.stickyWrapper}>
|
||||
<Upvote fetchPost={fetchPost} isShowPayoutValue content={post} />
|
||||
<TextWithIcon
|
||||
iconName="people"
|
||||
iconStyle={styles.barIcons}
|
||||
iconType="MaterialIcons"
|
||||
isClickable
|
||||
onPress={() => handleOnVotersPress && handleOnVotersPress(get(post, 'active_votes'))}
|
||||
text={get(post, 'vote_count', 0)}
|
||||
textMarginLeft={20}
|
||||
/>
|
||||
<TextWithIcon
|
||||
iconName="comment"
|
||||
iconStyle={styles.barIcons}
|
||||
iconType="MaterialIcons"
|
||||
isClickable
|
||||
text={get(post, 'children', 0)}
|
||||
textMarginLeft={20}
|
||||
/>
|
||||
<TextWithIcon
|
||||
iconName="repeat"
|
||||
iconStyle={styles.barIcons}
|
||||
iconType="MaterialIcons"
|
||||
isClickable
|
||||
onPress={() => handleOnReblogsPress && handleOnReblogsPress(get(post, 'reblogs'))}
|
||||
text={get(post, 'reblogCount', 0)}
|
||||
textMarginLeft={20}
|
||||
/>
|
||||
<View style={styles.stickyRightWrapper}>
|
||||
{get(currentAccount, 'name') === get(post, 'author') && (
|
||||
<Fragment>
|
||||
{!get(post, 'children') && !get(post, 'vote_count') && (
|
||||
<SafeAreaView>
|
||||
<StickyBar isFixedFooter={isFixedFooter}>
|
||||
<View style={styles.stickyWrapper}>
|
||||
<Upvote fetchPost={fetchPost} isShowPayoutValue content={post} />
|
||||
<TextWithIcon
|
||||
iconName="people"
|
||||
iconStyle={styles.barIcons}
|
||||
iconType="MaterialIcons"
|
||||
isClickable
|
||||
onPress={() => handleOnVotersPress && handleOnVotersPress(get(post, 'active_votes'))}
|
||||
text={get(post, 'vote_count', 0)}
|
||||
textMarginLeft={20}
|
||||
/>
|
||||
<TextWithIcon
|
||||
iconName="comment"
|
||||
iconStyle={styles.barIcons}
|
||||
iconType="MaterialIcons"
|
||||
isClickable
|
||||
text={get(post, 'children', 0)}
|
||||
textMarginLeft={20}
|
||||
/>
|
||||
<TextWithIcon
|
||||
iconName="repeat"
|
||||
iconStyle={styles.barIcons}
|
||||
iconType="MaterialIcons"
|
||||
isClickable
|
||||
onPress={() => handleOnReblogsPress && handleOnReblogsPress(get(post, 'reblogs'))}
|
||||
text={get(post, 'reblogCount', 0)}
|
||||
textMarginLeft={20}
|
||||
/>
|
||||
<View style={styles.stickyRightWrapper}>
|
||||
{get(currentAccount, 'name') === get(post, 'author') && (
|
||||
<Fragment>
|
||||
{!get(post, 'children') && !get(post, 'vote_count') && (
|
||||
<IconButton
|
||||
iconStyle={styles.barIconRight}
|
||||
iconType="MaterialIcons"
|
||||
name="delete-forever"
|
||||
onPress={() => this.ActionSheet.show()}
|
||||
style={styles.barIconButton}
|
||||
/>
|
||||
)}
|
||||
<IconButton
|
||||
iconStyle={styles.barIconRight}
|
||||
iconType="MaterialIcons"
|
||||
name="delete-forever"
|
||||
onPress={() => this.ActionSheet.show()}
|
||||
name="create"
|
||||
onPress={() => handleOnEditPress && handleOnEditPress()}
|
||||
style={styles.barIconButton}
|
||||
/>
|
||||
)}
|
||||
</Fragment>
|
||||
)}
|
||||
{isLoggedIn && (
|
||||
<IconButton
|
||||
iconStyle={styles.barIconRight}
|
||||
iconType="MaterialIcons"
|
||||
name="create"
|
||||
onPress={() => handleOnEditPress && handleOnEditPress()}
|
||||
name="reply"
|
||||
onPress={() => handleOnReplyPress && handleOnReplyPress()}
|
||||
style={styles.barIconButton}
|
||||
/>
|
||||
</Fragment>
|
||||
)}
|
||||
{isLoggedIn && (
|
||||
<IconButton
|
||||
iconStyle={styles.barIconRight}
|
||||
iconType="MaterialIcons"
|
||||
name="reply"
|
||||
onPress={() => handleOnReplyPress && handleOnReplyPress()}
|
||||
style={styles.barIconButton}
|
||||
/>
|
||||
)}
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</StickyBar>
|
||||
</StickyBar>
|
||||
</SafeAreaView>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user