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