mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 19:01:38 +03:00
Merge pull request #1955 from ecency/nt/tab-bar-refinements
Nt/tab bar refinements
This commit is contained in:
commit
b746f1af2a
@ -19,8 +19,8 @@ export default EStyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-around',
|
||||
alignItems: 'center',
|
||||
left: 5,
|
||||
flex: 6,
|
||||
marginRight: 8,
|
||||
flex: 1,
|
||||
},
|
||||
filterBarWrapper: {
|
||||
flex: 1,
|
||||
@ -29,11 +29,8 @@ export default EStyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
rightIconWrapper: {
|
||||
marginRight: 8,
|
||||
alignSelf: 'center',
|
||||
},
|
||||
customiseIconWrapper: {
|
||||
paddingRight: 8,
|
||||
paddingRight: 12,
|
||||
width: 40,
|
||||
alignSelf: 'center',
|
||||
},
|
||||
rightIcon: {
|
||||
|
@ -50,7 +50,7 @@ const FilterBarView = ({
|
||||
enableCustomiseButton && (
|
||||
<IconButton
|
||||
iconStyle={styles.rightIcon}
|
||||
style={styles.customiseIconWrapper}
|
||||
style={styles.rightIconWrapper}
|
||||
iconType={'MaterialIcon'}
|
||||
size={iconSize || 28}
|
||||
name={'add'}
|
||||
|
@ -50,6 +50,8 @@ const PostDisplayView = ({
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
const [postBodyLoading, setPostBodyLoading] = useState(false);
|
||||
|
||||
const [tags, setTags] = useState([]);
|
||||
|
||||
// Component Life Cycles
|
||||
useEffect(() => {
|
||||
if (isLoggedIn && get(currentAccount, 'name') && !isNewPost) {
|
||||
@ -57,6 +59,16 @@ const PostDisplayView = ({
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (post) {
|
||||
const _tags = post.json_metadata ? post.json_metadata.tags : [];
|
||||
if (post.category && _tags[0] !== post.category) {
|
||||
_tags.splice(0, 0, post.category);
|
||||
}
|
||||
setTags(_tags);
|
||||
}
|
||||
}, [post]);
|
||||
|
||||
// Component Functions
|
||||
const onRefresh = useCallback(() => {
|
||||
setRefreshing(true);
|
||||
@ -216,7 +228,7 @@ const PostDisplayView = ({
|
||||
<PostBody body={post.body} onLoadEnd={_handleOnPostBodyLoad} />
|
||||
{!postBodyLoading && (
|
||||
<View style={styles.footer}>
|
||||
<Tags tags={post.json_metadata && post.json_metadata.tags} />
|
||||
<Tags tags={tags} />
|
||||
<Text style={styles.footerText}>
|
||||
Posted by
|
||||
<Text style={styles.footerName}>{` ${author || post.author} `}</Text>
|
||||
|
Loading…
Reference in New Issue
Block a user