mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +03:00
fixed couple bugfix
This commit is contained in:
parent
89c285728a
commit
e8089d043b
@ -5,12 +5,6 @@ export default EStyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
alignSelf: 'center',
|
||||
},
|
||||
activeInput: {
|
||||
backgroundColor: '$primaryBlue',
|
||||
height: 10,
|
||||
width: 10,
|
||||
borderRadius: 20 / 2,
|
||||
},
|
||||
inputWithBackground: {
|
||||
backgroundColor: '$primaryBlue',
|
||||
},
|
||||
|
@ -32,16 +32,6 @@ class PinAnimatedInput extends PureComponent {
|
||||
]}
|
||||
>
|
||||
{[...Array(4)].map((val, index) => {
|
||||
if (pin.length === index) {
|
||||
return (
|
||||
<Animated.View key={`passwordItem-${index}`} style={styles.input}>
|
||||
<Animated.View
|
||||
key={`passwordItem-${index}`}
|
||||
style={[styles.input, styles.activeInput]}
|
||||
/>
|
||||
</Animated.View>
|
||||
);
|
||||
}
|
||||
if (pin.length > index) {
|
||||
return (
|
||||
<Animated.View key={`passwordItem-${index}`} style={styles.input}>
|
||||
|
@ -152,6 +152,7 @@ export default EStyleSheet.create({
|
||||
height: 200,
|
||||
width: '$deviceWidth - 16',
|
||||
borderRadius: 8,
|
||||
backgroundColor: '$primaryLightGray',
|
||||
},
|
||||
postDescripton: {
|
||||
flexDirection: 'column',
|
||||
|
@ -57,7 +57,9 @@ class PostCard extends Component {
|
||||
|
||||
render() {
|
||||
const { content, isHideImage, fetchPost } = this.props;
|
||||
const _image = content && content.image ? { uri: content.image } : DEFAULT_IMAGE;
|
||||
const _image = content && content.image
|
||||
? { uri: content.image, priority: FastImage.priority.high }
|
||||
: DEFAULT_IMAGE;
|
||||
|
||||
return (
|
||||
<View style={styles.post}>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Image } from 'react-native';
|
||||
import FastImage from 'react-native-fast-image';
|
||||
import styles from './userAvatarStyles';
|
||||
|
||||
const DEFAULT_IMAGE = require('../../../assets/avatar_default.png');
|
||||
@ -38,9 +38,8 @@ class UserAvatarView extends Component {
|
||||
_size = 64;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line
|
||||
return (
|
||||
<Image
|
||||
<FastImage
|
||||
style={[styles.avatar, style, { width: _size, height: _size, borderRadius: _size / 2 }]}
|
||||
source={_avatar}
|
||||
/>
|
||||
|
@ -109,7 +109,7 @@ const changeMarkdownImage = input => input.replace(markdownImageRegex, (link) =>
|
||||
const firstMarkdownMatch = markdownMatch[0];
|
||||
const _link = firstMarkdownMatch.match(urlRegex)[0];
|
||||
|
||||
return `<img data-href="${`https://img.esteem.app/500x0/${_link}`}" src="${`https://img.esteem.app/400x0/${_link}`}">`;
|
||||
return `<img data-href="${`https://img.esteem.app/500x0/${_link}`}" src="${`https://img.esteem.app/500x0/${_link}`}">`;
|
||||
}
|
||||
return link;
|
||||
});
|
||||
@ -127,7 +127,7 @@ const createCenterImage = input => input.replace(imgCenterRegex, (link) => {
|
||||
const changePullRightLeft = input => input.replace(pullRightLeftRegex, (item) => {
|
||||
const imageLink = item.match(linkRegex)[0];
|
||||
|
||||
return `<center style="text-align:center;"><img src="${`https://img.esteem.app/400x0/${imageLink}`}"/></center><br>`;
|
||||
return `<center style="text-align:center;"><img src="${`https://img.esteem.app/500x0/${imageLink}`}"/></center><br>`;
|
||||
});
|
||||
|
||||
const steemitUrlHandle = input => input.replace(postRegex, (link) => {
|
||||
@ -141,12 +141,12 @@ const steemitUrlHandle = input => input.replace(postRegex, (link) => {
|
||||
|
||||
const createImage = input => input.replace(
|
||||
onlyImageLinkRegex,
|
||||
link => `<img data-href="${`https://img.esteem.app/300x0/${link}`}" src="${`https://img.esteem.app/400x0/${link}`}">`,
|
||||
link => `<img data-href="${`https://img.esteem.app/300x0/${link}`}" src="${`https://img.esteem.app/500x0/${link}`}">`,
|
||||
);
|
||||
|
||||
const createFromDoubleImageLink = input => input.replace(onlyImageDoubleLinkRegex, (link) => {
|
||||
const _link = link.trim();
|
||||
return `<img data-href="https://img.esteem.app/300x0/${_link}" src="https://img.esteem.app/300x0/${_link}">`;
|
||||
return `<img data-href="https://img.esteem.app/300x0/${_link}" src="https://img.esteem.app/500x0/${_link}">`;
|
||||
});
|
||||
|
||||
const createYoutubeIframe = input => input.replace(youTubeRegex, (link) => {
|
||||
|
@ -68,13 +68,13 @@ const postImage = (metaData, body) => {
|
||||
}
|
||||
}
|
||||
|
||||
if(!imageLink && imageRegex.test(body)) {
|
||||
if (!imageLink && imageRegex.test(body)) {
|
||||
const imageMatch = body.match(imageRegex);
|
||||
imageLink = imageMatch[0];
|
||||
}
|
||||
|
||||
if (imageLink) {
|
||||
return `https://img.esteem.app/300x0/${imageLink}`;
|
||||
return `https://img.esteem.app/600x0/${imageLink}`;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user