mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-23 05:13:04 +03:00
Merge branch 'bugfix/navbar' of github.com:esteemapp/esteem-mobile into bugfix/navbar
This commit is contained in:
commit
afc6ca6691
@ -1,4 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
extends: '@react-native-community',
|
|
||||||
};
|
|
@ -5,14 +5,18 @@
|
|||||||
"prettier",
|
"prettier",
|
||||||
"plugin:prettier/recommended",
|
"plugin:prettier/recommended",
|
||||||
"plugin:eslint-comments/recommended",
|
"plugin:eslint-comments/recommended",
|
||||||
|
"eslint:recommended",
|
||||||
"plugin:import/errors",
|
"plugin:import/errors",
|
||||||
"plugin:import/warnings",
|
"plugin:import/warnings",
|
||||||
"plugin:jest/recommended"
|
"plugin:jest/recommended",
|
||||||
|
"@react-native-community",
|
||||||
|
"plugin:import/typescript"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"jest": true,
|
"jest": true,
|
||||||
"react-native/react-native": true
|
"react-native/react-native": true,
|
||||||
|
"node": true
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"react",
|
"react",
|
||||||
@ -31,7 +35,7 @@
|
|||||||
"extensions": [".js", ".jsx"]
|
"extensions": [".js", ".jsx"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"max-len": ["error", 100],
|
"max-len": ["warn", 100],
|
||||||
"react/forbid-prop-types": [0],
|
"react/forbid-prop-types": [0],
|
||||||
"no-underscore-dangle": 0,
|
"no-underscore-dangle": 0,
|
||||||
"react/require-default-props": [0],
|
"react/require-default-props": [0],
|
||||||
@ -44,14 +48,16 @@
|
|||||||
"import/no-named-default": "off",
|
"import/no-named-default": "off",
|
||||||
"no-param-reassign": "off",
|
"no-param-reassign": "off",
|
||||||
"no-case-declarations": "off",
|
"no-case-declarations": "off",
|
||||||
"no-cycle": "off",
|
"import/no-cycle": "off",
|
||||||
"react-hooks/rules-of-hooks": "error",
|
"react-hooks/rules-of-hooks": "error",
|
||||||
"react-hooks/exhaustive-deps": "warn",
|
"react-hooks/exhaustive-deps": "off",
|
||||||
|
"react/destructuring-assignment": [1, "always"],
|
||||||
"import/no-extraneous-dependencies": [
|
"import/no-extraneous-dependencies": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"devDependencies": true
|
"devDependencies": true
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"import/no-unresolved": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -66,7 +66,7 @@
|
|||||||
"react-native-navigation-bar-color": "^0.1.0",
|
"react-native-navigation-bar-color": "^0.1.0",
|
||||||
"react-native-reanimated": "^1.3.0",
|
"react-native-reanimated": "^1.3.0",
|
||||||
"react-native-render-html": "^4.1.2",
|
"react-native-render-html": "^4.1.2",
|
||||||
"react-native-screens": "^2.0.0-alpha.15",
|
"react-native-screens": "^2.0.0-alpha.16",
|
||||||
"react-native-scrollable-tab-view": "esteemapp/react-native-scrollable-tab-view",
|
"react-native-scrollable-tab-view": "esteemapp/react-native-scrollable-tab-view",
|
||||||
"react-native-slider": "^0.11.0",
|
"react-native-slider": "^0.11.0",
|
||||||
"react-native-snap-carousel": "^3.8.0",
|
"react-native-snap-carousel": "^3.8.0",
|
||||||
@ -80,7 +80,7 @@
|
|||||||
"react-navigation-drawer": "^2.2.2",
|
"react-navigation-drawer": "^2.2.2",
|
||||||
"react-navigation-redux-helpers": "^2.0.8",
|
"react-navigation-redux-helpers": "^2.0.8",
|
||||||
"react-navigation-stack": "^1.9.3",
|
"react-navigation-stack": "^1.9.3",
|
||||||
"react-navigation-tabs": "^2.5.5",
|
"react-navigation-tabs": "^2.6.2",
|
||||||
"react-redux": "^7.1.1",
|
"react-redux": "^7.1.1",
|
||||||
"redux": "^4.0.4",
|
"redux": "^4.0.4",
|
||||||
"redux-persist": "^6.0.0",
|
"redux-persist": "^6.0.0",
|
||||||
|
@ -32,3 +32,4 @@ class ExampleView extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default ExampleView;
|
export default ExampleView;
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -15,6 +15,8 @@ const styles = StyleSheet.create({
|
|||||||
});
|
});
|
||||||
|
|
||||||
class PulseAnimation extends Component {
|
class PulseAnimation extends Component {
|
||||||
|
mounted = true;
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
diameter: 400,
|
diameter: 400,
|
||||||
@ -33,8 +35,6 @@ class PulseAnimation extends Component {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
mounted = true;
|
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@ -97,6 +97,7 @@ class PulseAnimation extends Component {
|
|||||||
|
|
||||||
updatePulse = () => {
|
updatePulse = () => {
|
||||||
if (this.mounted) {
|
if (this.mounted) {
|
||||||
|
// eslint-disable-next-line react/no-access-state-in-setstate
|
||||||
const pulses = this.state.pulses.map((p, i) => {
|
const pulses = this.state.pulses.map((p, i) => {
|
||||||
const { maxDiameter } = this.state;
|
const { maxDiameter } = this.state;
|
||||||
const newDiameter = p.diameter > maxDiameter ? 0 : p.diameter + 2;
|
const newDiameter = p.diameter > maxDiameter ? 0 : p.diameter + 2;
|
||||||
|
@ -51,3 +51,4 @@ const BoostPlaceHolder = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default BoostPlaceHolder;
|
export default BoostPlaceHolder;
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -18,3 +18,4 @@ const ListPlaceHolderView = () => {
|
|||||||
return <Fragment>{listElements}</Fragment>;
|
return <Fragment>{listElements}</Fragment>;
|
||||||
};
|
};
|
||||||
export default ListPlaceHolderView;
|
export default ListPlaceHolderView;
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -43,3 +43,4 @@ const WalletDetailsPlaceHolder = () => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
export default WalletDetailsPlaceHolder;
|
export default WalletDetailsPlaceHolder;
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -17,6 +17,7 @@ export default EStyleSheet.create({
|
|||||||
paddingHorizontal: Platform.OS === 'android' ? 20 : 10,
|
paddingHorizontal: Platform.OS === 'android' ? 20 : 10,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
marginRight: 8,
|
marginRight: 8,
|
||||||
|
marginLeft: 8,
|
||||||
height: 22,
|
height: 22,
|
||||||
backgroundColor: '$iconColor',
|
backgroundColor: '$iconColor',
|
||||||
borderRadius: 50,
|
borderRadius: 50,
|
||||||
@ -26,9 +27,9 @@ export default EStyleSheet.create({
|
|||||||
},
|
},
|
||||||
isFilterTextUnPin: {
|
isFilterTextUnPin: {
|
||||||
color: '$primaryDarkGray',
|
color: '$primaryDarkGray',
|
||||||
fontSize: 14,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
isFilterTextPin: {
|
isFilterTextPin: {
|
||||||
fontSize: 14,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -3,12 +3,12 @@ import { View, TouchableHighlight, Animated } from 'react-native';
|
|||||||
import Svg, { Circle, Path } from 'react-native-svg';
|
import Svg, { Circle, Path } from 'react-native-svg';
|
||||||
|
|
||||||
import scalePx from '../../../utils/scalePx';
|
import scalePx from '../../../utils/scalePx';
|
||||||
|
import styles from './bottomTabBarStyles';
|
||||||
|
|
||||||
|
|
||||||
const AnimatedCircle = Animated.createAnimatedComponent(Circle);
|
const AnimatedCircle = Animated.createAnimatedComponent(Circle);
|
||||||
const AnimatedPath = Animated.createAnimatedComponent(Path);
|
const AnimatedPath = Animated.createAnimatedComponent(Path);
|
||||||
|
|
||||||
import styles from './bottomTabBarStyles';
|
|
||||||
|
|
||||||
export default class TabBar extends Component {
|
export default class TabBar extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -34,7 +34,7 @@ export default class TabBar extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
selectedIndex: selectedIndex,
|
selectedIndex,
|
||||||
circleRadius: new Animated.Value(91 + selectedIndex * value),
|
circleRadius: new Animated.Value(91 + selectedIndex * value),
|
||||||
pathD: new Animated.Value(selectedIndex * value),
|
pathD: new Animated.Value(selectedIndex * value),
|
||||||
pathX: selectedIndex * value,
|
pathX: selectedIndex * value,
|
||||||
@ -104,6 +104,7 @@ export default class TabBar extends Component {
|
|||||||
return React.cloneElement(route, {
|
return React.cloneElement(route, {
|
||||||
selected: selectedIndex === i,
|
selected: selectedIndex === i,
|
||||||
onPress: this._onPress,
|
onPress: this._onPress,
|
||||||
|
// eslint-disable-next-line react/no-array-index-key
|
||||||
key: i,
|
key: i,
|
||||||
index: i,
|
index: i,
|
||||||
showIcon: true,
|
showIcon: true,
|
||||||
@ -134,6 +135,7 @@ export default class TabBar extends Component {
|
|||||||
pathX}.941653,71.4462087 ${31 + pathX}.454074,80.6628108 Z`}
|
pathX}.941653,71.4462087 ${31 + pathX}.454074,80.6628108 Z`}
|
||||||
/>
|
/>
|
||||||
<AnimatedCircle
|
<AnimatedCircle
|
||||||
|
// eslint-disable-next-line no-return-assign
|
||||||
ref={ref => (this._myCircle = ref)}
|
ref={ref => (this._myCircle = ref)}
|
||||||
fill={circleBackgroundColor}
|
fill={circleBackgroundColor}
|
||||||
cx={circleRadius}
|
cx={circleRadius}
|
||||||
@ -162,7 +164,12 @@ const TabBarItem = ({
|
|||||||
}
|
}
|
||||||
if (showIcon) {
|
if (showIcon) {
|
||||||
return (
|
return (
|
||||||
<TouchableHighlight underlayColor={'transparent'} style={styles.navItem}>
|
<TouchableHighlight
|
||||||
|
underlayColor="transparent"
|
||||||
|
style={[
|
||||||
|
styles.navItem
|
||||||
|
]}
|
||||||
|
>
|
||||||
<View style={styles.circle}>{selectedIcon || icon}</View>
|
<View style={styles.circle}>{selectedIcon || icon}</View>
|
||||||
</TouchableHighlight>
|
</TouchableHighlight>
|
||||||
);
|
);
|
||||||
@ -173,7 +180,7 @@ const TabBarItem = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TouchableHighlight
|
<TouchableHighlight
|
||||||
underlayColor={'transparent'}
|
underlayColor="transparent"
|
||||||
style={styles.navItem}
|
style={styles.navItem}
|
||||||
onPress={() => onPress(index, disabled)}
|
onPress={() => onPress(index, disabled)}
|
||||||
>
|
>
|
||||||
|
@ -32,23 +32,6 @@ class CollapsibleCardView extends PureComponent {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { isExpanded, moreHeight, locked } = this.props;
|
|
||||||
const { expanded } = this.state;
|
|
||||||
|
|
||||||
if (
|
|
||||||
(locked || !nextProps.isExpanded) &&
|
|
||||||
isExpanded !== nextProps.isExpanded &&
|
|
||||||
expanded !== nextProps.isExpanded
|
|
||||||
) {
|
|
||||||
this._toggleOnPress();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (moreHeight !== nextProps.moreHeight) {
|
|
||||||
this.anime.height.setValue(this._getMaxValue() + nextProps.moreHeight);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
_initContentHeight = event => {
|
_initContentHeight = event => {
|
||||||
if (this.anime.contentHeight > 0) {
|
if (this.anime.contentHeight > 0) {
|
||||||
@ -79,6 +62,23 @@ class CollapsibleCardView extends PureComponent {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { isExpanded, moreHeight, locked } = this.props;
|
||||||
|
const { expanded } = this.state;
|
||||||
|
|
||||||
|
if (
|
||||||
|
(locked || !nextProps.isExpanded) &&
|
||||||
|
isExpanded !== nextProps.isExpanded &&
|
||||||
|
expanded !== nextProps.isExpanded
|
||||||
|
) {
|
||||||
|
this._toggleOnPress();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (moreHeight !== nextProps.moreHeight) {
|
||||||
|
this.anime.height.setValue(this._getMaxValue() + nextProps.moreHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
|
@ -36,19 +36,6 @@ class CommentsContainer extends Component {
|
|||||||
this._getComments();
|
this._getComments();
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { commentCount, selectedFilter } = this.props;
|
|
||||||
|
|
||||||
if (nextProps.commentCount > commentCount) {
|
|
||||||
this._getComments();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedFilter !== get(nextProps, 'selectedFilter') && get(nextProps, 'selectedFilter')) {
|
|
||||||
const shortedComments = this._shortComments(get(nextProps, 'selectedFilter'));
|
|
||||||
this.setState({ comments: shortedComments });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
|
|
||||||
_shortComments = (sortOrder, comments) => {
|
_shortComments = (sortOrder, comments) => {
|
||||||
@ -244,6 +231,19 @@ class CommentsContainer extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { commentCount, selectedFilter } = this.props;
|
||||||
|
|
||||||
|
if (nextProps.commentCount > commentCount) {
|
||||||
|
this._getComments();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedFilter !== get(nextProps, 'selectedFilter') && get(nextProps, 'selectedFilter')) {
|
||||||
|
const shortedComments = this._shortComments(get(nextProps, 'selectedFilter'));
|
||||||
|
this.setState({ comments: shortedComments });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { comments: _comments, selectedPermlink } = this.state;
|
const { comments: _comments, selectedPermlink } = this.state;
|
||||||
const {
|
const {
|
||||||
|
@ -105,3 +105,4 @@ DateTimePickerView.defaultProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default injectIntl(DateTimePickerView);
|
export default injectIntl(DateTimePickerView);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -24,22 +24,6 @@ export default class TagAreaView extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycles
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { draftChips, isRemoveTag } = this.props;
|
|
||||||
|
|
||||||
if (nextProps.draftChips && nextProps.draftChips !== draftChips) {
|
|
||||||
const _chips = [...nextProps.draftChips, ' '];
|
|
||||||
this.setState({
|
|
||||||
chips: _chips,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isRemoveTag !== nextProps.isRemoveTag && nextProps.isRemoveTag) {
|
|
||||||
this.setState({ chips: [' '], currentText: '' });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
_handleOnChange = (text, i) => {
|
_handleOnChange = (text, i) => {
|
||||||
this.setState({ currentText: text.replace(/\s/g, '').replace(/,/g, '') });
|
this.setState({ currentText: text.replace(/\s/g, '').replace(/,/g, '') });
|
||||||
@ -96,6 +80,22 @@ export default class TagAreaView extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Component Life Cycles
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { draftChips, isRemoveTag } = this.props;
|
||||||
|
|
||||||
|
if (nextProps.draftChips && nextProps.draftChips !== draftChips) {
|
||||||
|
const _chips = [...nextProps.draftChips, ' '];
|
||||||
|
this.setState({
|
||||||
|
chips: _chips,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isRemoveTag !== nextProps.isRemoveTag && nextProps.isRemoveTag) {
|
||||||
|
this.setState({ chips: [' '], currentText: '' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isPreviewActive } = this.props;
|
const { isPreviewActive } = this.props;
|
||||||
const { chips, activeChip, currentText } = this.state;
|
const { chips, activeChip, currentText } = this.state;
|
||||||
@ -107,6 +107,7 @@ export default class TagAreaView extends Component {
|
|||||||
(chip, i) =>
|
(chip, i) =>
|
||||||
i < 7 && (
|
i < 7 && (
|
||||||
<Chip
|
<Chip
|
||||||
|
// eslint-disable-next-line react/no-array-index-key
|
||||||
key={i}
|
key={i}
|
||||||
refs={input => {
|
refs={input => {
|
||||||
this.inputs[i] = input;
|
this.inputs[i] = input;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import EStyleSheet from 'react-native-extended-stylesheet';
|
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||||
|
import { Dimensions } from 'react-native';
|
||||||
|
|
||||||
|
const deviceWidth = Dimensions.get('window').width;
|
||||||
|
|
||||||
export default EStyleSheet.create({
|
export default EStyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
@ -14,9 +17,10 @@ export default EStyleSheet.create({
|
|||||||
},
|
},
|
||||||
dropdownWrapper: {
|
dropdownWrapper: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'center',
|
justifyContent: 'space-around',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
left: 15,
|
left: 5,
|
||||||
|
flex: 6,
|
||||||
},
|
},
|
||||||
filterBarWrapper: {
|
filterBarWrapper: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@ -24,7 +28,8 @@ export default EStyleSheet.create({
|
|||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
},
|
},
|
||||||
rightIconWrapper: {
|
rightIconWrapper: {
|
||||||
marginRight: 16,
|
flex: 1,
|
||||||
|
marginRight: 5,
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
},
|
},
|
||||||
rightIcon: {
|
rightIcon: {
|
||||||
|
@ -33,15 +33,6 @@ class FormInputView extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycles
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { isValid } = this.props;
|
|
||||||
|
|
||||||
if (nextProps.isValid !== isValid) {
|
|
||||||
this.setState({ isValid: nextProps.isValid });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
_handleOnChange = value => {
|
_handleOnChange = value => {
|
||||||
const { onChange } = this.props;
|
const { onChange } = this.props;
|
||||||
@ -56,6 +47,15 @@ class FormInputView extends Component {
|
|||||||
this.setState({ inputBorderColor: '#357ce6' });
|
this.setState({ inputBorderColor: '#357ce6' });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Component Life Cycles
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { isValid } = this.props;
|
||||||
|
|
||||||
|
if (nextProps.isValid !== isValid) {
|
||||||
|
this.setState({ isValid: nextProps.isValid });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { inputBorderColor, isValid, value } = this.state;
|
const { inputBorderColor, isValid, value } = this.state;
|
||||||
const {
|
const {
|
||||||
|
@ -7,9 +7,9 @@ const FormattedCurrency = ({ value, fixAt = 3, currency, isApproximate = false }
|
|||||||
const toFixedValue = valueInCurrency.toFixed(fixAt);
|
const toFixedValue = valueInCurrency.toFixed(fixAt);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment key={toFixedValue.toString()}>{`${
|
<Fragment key={toFixedValue.toString()}>
|
||||||
isApproximate ? '~' : ''
|
{`${isApproximate ? '~' : ''}${currencySymbol} ${toFixedValue}`}
|
||||||
}${currencySymbol} ${toFixedValue}`}</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,8 +12,7 @@ export default EStyleSheet.create({
|
|||||||
right: 10,
|
right: 10,
|
||||||
top: 13,
|
top: 13,
|
||||||
backgroundColor: '$primaryRed',
|
backgroundColor: '$primaryRed',
|
||||||
borderColor: '$white',
|
borderWidth: 0,
|
||||||
borderWidth: 2,
|
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
zIndex: 99,
|
zIndex: 99,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { AvatarHeader } from './avatarHeader';
|
import { AvatarHeader } from './avatarHeader';
|
||||||
import { BasicHeader } from './basicHeader';
|
import { BasicHeader } from './basicHeader';
|
||||||
import { BoostIndicatorAnimation } from './animations';
|
import { BoostIndicatorAnimation, PulseAnimation, SpinIndicator } from './animations';
|
||||||
import { BottomTabBar } from './bottomTabBar';
|
import { BottomTabBar } from './bottomTabBar';
|
||||||
import { CheckBox } from './checkbox';
|
import { CheckBox } from './checkbox';
|
||||||
import { CircularButton, TextButton, SquareButton } from './buttons';
|
import { CircularButton, TextButton, SquareButton } from './buttons';
|
||||||
@ -32,13 +32,13 @@ import { PostForm } from './postForm';
|
|||||||
import { PostHeaderDescription, PostBody, Tags } from './postElements';
|
import { PostHeaderDescription, PostBody, Tags } from './postElements';
|
||||||
import { PostListItem } from './postListItem';
|
import { PostListItem } from './postListItem';
|
||||||
import { ProfileSummary } from './profileSummary';
|
import { ProfileSummary } from './profileSummary';
|
||||||
import { PulseAnimation } from './animations';
|
|
||||||
import { SearchInput } from './searchInput';
|
import { SearchInput } from './searchInput';
|
||||||
import { SearchModal } from './searchModal';
|
import { SearchModal } from './searchModal';
|
||||||
import { SettingsItem } from './settingsItem';
|
import { SettingsItem } from './settingsItem';
|
||||||
import { SideMenu } from './sideMenu';
|
import { SideMenu } from './sideMenu';
|
||||||
import { SpinIndicator } from './animations';
|
|
||||||
import { SummaryArea, TagArea, TextArea, TitleArea } from './editorElements';
|
import { SummaryArea, TagArea, TitleArea } from './editorElements';
|
||||||
import { TabBar } from './tabBar';
|
import { TabBar } from './tabBar';
|
||||||
import { TextInput } from './textInput';
|
import { TextInput } from './textInput';
|
||||||
import { ToastNotification } from './toastNotification';
|
import { ToastNotification } from './toastNotification';
|
||||||
@ -171,7 +171,6 @@ export {
|
|||||||
Tag,
|
Tag,
|
||||||
TagArea,
|
TagArea,
|
||||||
Tags,
|
Tags,
|
||||||
TextArea,
|
|
||||||
TextButton,
|
TextButton,
|
||||||
TextInput,
|
TextInput,
|
||||||
TextWithIcon,
|
TextWithIcon,
|
||||||
|
@ -27,16 +27,6 @@ class MainButton extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycles
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { isLoading, isDisable } = this.props;
|
|
||||||
if (nextProps.isLoading !== isLoading || nextProps.isDisable !== isDisable) {
|
|
||||||
this.setState({
|
|
||||||
isDisable: !nextProps.isLoading && nextProps.isDisable,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
_handleOnPress = () => {
|
_handleOnPress = () => {
|
||||||
const { onPress } = this.props;
|
const { onPress } = this.props;
|
||||||
@ -88,6 +78,16 @@ class MainButton extends Component {
|
|||||||
|
|
||||||
_getIndicator = () => <ActivityIndicator color="white" style={styles.activityIndicator} />;
|
_getIndicator = () => <ActivityIndicator color="white" style={styles.activityIndicator} />;
|
||||||
|
|
||||||
|
// Component Life Cycles
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { isLoading, isDisable } = this.props;
|
||||||
|
if (nextProps.isLoading !== isLoading || nextProps.isDisable !== isDisable) {
|
||||||
|
this.setState({
|
||||||
|
isDisable: !nextProps.isLoading && nextProps.isDisable,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { wrapperStyle, children, height, style, isLoading } = this.props;
|
const { wrapperStyle, children, height, style, isLoading } = this.props;
|
||||||
const { isDisable } = this.state;
|
const { isDisable } = this.state;
|
||||||
|
@ -45,13 +45,13 @@ const MarkdownEditorView = ({
|
|||||||
if (!isPreviewActive) {
|
if (!isPreviewActive) {
|
||||||
_setTextAndSelection({ selection: { start: 0, end: 0 }, text });
|
_setTextAndSelection({ selection: { start: 0, end: 0 }, text });
|
||||||
}
|
}
|
||||||
}, [_setTextAndSelection, isPreviewActive, text]);
|
}, [isPreviewActive]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (text === '' && draftBody !== '') {
|
if (text === '' && draftBody !== '') {
|
||||||
_setTextAndSelection({ selection: { start: 0, end: 0 }, text: draftBody });
|
_setTextAndSelection({ selection: { start: 0, end: 0 }, text: draftBody });
|
||||||
}
|
}
|
||||||
}, [_setTextAndSelection, draftBody, text]);
|
}, [draftBody]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (editable === null) {
|
if (editable === null) {
|
||||||
@ -63,7 +63,7 @@ const MarkdownEditorView = ({
|
|||||||
} else {
|
} else {
|
||||||
setEditable(!isLoading);
|
setEditable(!isLoading);
|
||||||
}
|
}
|
||||||
}, [editable, isLoading]);
|
}, [isLoading]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (uploadedImage && uploadedImage.url) {
|
if (uploadedImage && uploadedImage.url) {
|
||||||
@ -75,7 +75,7 @@ const MarkdownEditorView = ({
|
|||||||
isImage: !!uploadedImage,
|
isImage: !!uploadedImage,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [_setTextAndSelection, selection, text, uploadedImage]);
|
}, [uploadedImage]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setText(draftBody);
|
setText(draftBody);
|
||||||
@ -91,7 +91,7 @@ const MarkdownEditorView = ({
|
|||||||
handleIsFormValid(text);
|
handleIsFormValid(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [_changeText, handleIsFormValid, text]);
|
}, [text]);
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
const _changeText = useCallback(input => {
|
const _changeText = useCallback(input => {
|
||||||
|
@ -169,7 +169,7 @@ class NotificationView extends PureComponent {
|
|||||||
options={filters.map(item => item.value)}
|
options={filters.map(item => item.value)}
|
||||||
defaultText="ALL"
|
defaultText="ALL"
|
||||||
onDropdownSelect={this._handleOnDropdownSelect}
|
onDropdownSelect={this._handleOnDropdownSelect}
|
||||||
rightIconName="check"
|
rightIconName="playlist-add-check"
|
||||||
rightIconType="MaterialIcons"
|
rightIconType="MaterialIcons"
|
||||||
selectedOptionIndex={selectedIndex}
|
selectedOptionIndex={selectedIndex}
|
||||||
onRightIconPress={readAllNotification}
|
onRightIconPress={readAllNotification}
|
||||||
@ -214,3 +214,4 @@ class NotificationView extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default injectIntl(NotificationView);
|
export default injectIntl(NotificationView);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable react/jsx-one-expression-per-line */
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { View, Text, Image, TouchableHighlight } from 'react-native';
|
import { View, Text, Image, TouchableHighlight } from 'react-native';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
@ -75,3 +76,4 @@ const NotificationLineView = ({ notification, handleOnPressNotification }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default NotificationLineView;
|
export default NotificationLineView;
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable react/no-array-index-key */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Animated, Easing, View } from 'react-native';
|
import { Animated, Easing, View } from 'react-native';
|
||||||
|
|
||||||
@ -22,17 +23,6 @@ class PinAnimatedInput extends Component {
|
|||||||
this.dots[3] = new Animated.Value(0);
|
this.dots[3] = new Animated.Value(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { loading } = this.props;
|
|
||||||
if (loading !== nextProps.loading) {
|
|
||||||
if (nextProps.loading) {
|
|
||||||
this._startLoadingAnimation();
|
|
||||||
} else {
|
|
||||||
this._stopLoadingAnimation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_startLoadingAnimation = () => {
|
_startLoadingAnimation = () => {
|
||||||
[...Array(4)].map((item, index) => {
|
[...Array(4)].map((item, index) => {
|
||||||
this.dots[index].setValue(0);
|
this.dots[index].setValue(0);
|
||||||
@ -58,6 +48,17 @@ class PinAnimatedInput extends Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { loading } = this.props;
|
||||||
|
if (loading !== nextProps.loading) {
|
||||||
|
if (nextProps.loading) {
|
||||||
|
this._startLoadingAnimation();
|
||||||
|
} else {
|
||||||
|
this._stopLoadingAnimation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { pin } = this.props;
|
const { pin } = this.props;
|
||||||
const marginBottom = [];
|
const marginBottom = [];
|
||||||
@ -88,3 +89,4 @@ class PinAnimatedInput extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default PinAnimatedInput;
|
export default PinAnimatedInput;
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -145,11 +145,9 @@ class BoostPostScreen extends PureComponent {
|
|||||||
<Text style={styles.balanceText}>{`${balance || _balance} ESTM`}</Text>
|
<Text style={styles.balanceText}>{`${balance || _balance} ESTM`}</Text>
|
||||||
<View style={styles.autocompleteLineContainer}>
|
<View style={styles.autocompleteLineContainer}>
|
||||||
<View style={styles.autocompleteLabelContainer}>
|
<View style={styles.autocompleteLabelContainer}>
|
||||||
{
|
<Text style={styles.autocompleteLabelText}>
|
||||||
<Text style={styles.autocompleteLabelText}>
|
{intl.formatMessage({ id: 'promote.permlink' })}
|
||||||
{intl.formatMessage({ id: 'promote.permlink' })}
|
</Text>
|
||||||
</Text>
|
|
||||||
}
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
|
@ -24,12 +24,6 @@ class PostCardContainer extends PureComponent {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
if (get(nextProps, 'isRefresh')) {
|
|
||||||
this._fetchPost();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_handleOnUserPress = () => {
|
_handleOnUserPress = () => {
|
||||||
const { navigation, currentAccount, content } = this.props;
|
const { navigation, currentAccount, content } = this.props;
|
||||||
if (content && get(currentAccount, 'name') !== get(content, 'author')) {
|
if (content && get(currentAccount, 'name') !== get(content, 'author')) {
|
||||||
@ -94,6 +88,12 @@ class PostCardContainer extends PureComponent {
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
if (get(nextProps, 'isRefresh')) {
|
||||||
|
this._fetchPost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { content, isHideImage, nsfw } = this.props;
|
const { content, isHideImage, nsfw } = this.props;
|
||||||
const { _content } = this.state;
|
const { _content } = this.state;
|
||||||
|
@ -36,17 +36,6 @@ class PostCardView extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Component Lifecycle Functions
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { content } = this.props;
|
|
||||||
const rebloggedBy = get(content, 'reblogged_by[0]', null);
|
|
||||||
const _rebloggedBy = get(nextProps.content, 'reblogged_by[0]', null);
|
|
||||||
|
|
||||||
if (rebloggedBy !== _rebloggedBy && !_rebloggedBy) {
|
|
||||||
this.setState({ rebloggedBy });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
|
|
||||||
_handleOnUserPress = () => {
|
_handleOnUserPress = () => {
|
||||||
@ -87,6 +76,17 @@ class PostCardView extends Component {
|
|||||||
return DEFAULT_IMAGE;
|
return DEFAULT_IMAGE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Component Lifecycle Functions
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { content } = this.props;
|
||||||
|
const rebloggedBy = get(content, 'reblogged_by[0]', null);
|
||||||
|
const _rebloggedBy = get(nextProps.content, 'reblogged_by[0]', null);
|
||||||
|
|
||||||
|
if (rebloggedBy !== _rebloggedBy && !_rebloggedBy) {
|
||||||
|
this.setState({ rebloggedBy });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { content, isHideImage, fetchPost, isNsfwPost, intl } = this.props;
|
const { content, isHideImage, fetchPost, isNsfwPost, intl } = this.props;
|
||||||
const { rebloggedBy } = this.state;
|
const { rebloggedBy } = this.state;
|
||||||
|
@ -6,7 +6,7 @@ import AutoHeightWebView from 'react-native-autoheight-webview';
|
|||||||
import EStyleSheet from 'react-native-extended-stylesheet';
|
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
|
|
||||||
import script from './config.js';
|
import script from './config';
|
||||||
import { PostPlaceHolder, CommentPlaceHolder } from '../../../basicUIElements';
|
import { PostPlaceHolder, CommentPlaceHolder } from '../../../basicUIElements';
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
@ -29,14 +29,6 @@ class PostDisplayContainer extends Component {
|
|||||||
this.state = {};
|
this.state = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycle Functions
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { isFetchPost } = this.props;
|
|
||||||
if (isFetchPost !== nextProps.isFetchPost && nextProps.isFetchPost) {
|
|
||||||
this._fetchPost();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
_handleOnVotersPress = activeVotes => {
|
_handleOnVotersPress = activeVotes => {
|
||||||
const { navigation, post } = this.props;
|
const { navigation, post } = this.props;
|
||||||
@ -119,6 +111,14 @@ class PostDisplayContainer extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Component Life Cycle Functions
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { isFetchPost } = this.props;
|
||||||
|
if (isFetchPost !== nextProps.isFetchPost && nextProps.isFetchPost) {
|
||||||
|
this._fetchPost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
currentAccount,
|
currentAccount,
|
||||||
|
@ -25,6 +25,7 @@ const PostsContainer = ({
|
|||||||
tag,
|
tag,
|
||||||
nsfw,
|
nsfw,
|
||||||
filterOptionsValue,
|
filterOptionsValue,
|
||||||
|
feedUsername,
|
||||||
}) => {
|
}) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ const PostsContainer = ({
|
|||||||
setFeedPosts={_setFeedPosts}
|
setFeedPosts={_setFeedPosts}
|
||||||
tag={tag}
|
tag={tag}
|
||||||
filterOptionsValue={filterOptionsValue}
|
filterOptionsValue={filterOptionsValue}
|
||||||
|
feedUsername={feedUsername}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</AccountContainer>
|
</AccountContainer>
|
||||||
|
@ -39,6 +39,7 @@ const PostsView = ({
|
|||||||
changeForceLoadPostState,
|
changeForceLoadPostState,
|
||||||
forceLoadPost,
|
forceLoadPost,
|
||||||
filterOptionsValue,
|
filterOptionsValue,
|
||||||
|
feedUsername,
|
||||||
}) => {
|
}) => {
|
||||||
const [posts, setPosts] = useState(isConnected ? [] : feedPosts);
|
const [posts, setPosts] = useState(isConnected ? [] : feedPosts);
|
||||||
const [startAuthor, setStartAuthor] = useState('');
|
const [startAuthor, setStartAuthor] = useState('');
|
||||||
@ -167,11 +168,12 @@ const PostsView = ({
|
|||||||
|
|
||||||
if (filter === 'feed' || filter === 'blog' || getFor === 'blog' || filter === 'reblogs') {
|
if (filter === 'feed' || filter === 'blog' || getFor === 'blog' || filter === 'reblogs') {
|
||||||
options = {
|
options = {
|
||||||
tag,
|
tag: feedUsername,
|
||||||
limit,
|
limit,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
options = {
|
options = {
|
||||||
|
tag,
|
||||||
limit,
|
limit,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -395,3 +397,4 @@ const PostsView = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default withNavigation(PostsView);
|
export default withNavigation(PostsView);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -177,7 +177,7 @@ class ProfileView extends PureComponent {
|
|||||||
selectedOptionIndex={0}
|
selectedOptionIndex={0}
|
||||||
pageType="profiles"
|
pageType="profiles"
|
||||||
getFor="blog"
|
getFor="blog"
|
||||||
tag={username}
|
feedUsername={username}
|
||||||
key={username}
|
key={username}
|
||||||
handleOnScroll={isSummaryOpen ? this._handleOnScroll : null}
|
handleOnScroll={isSummaryOpen ? this._handleOnScroll : null}
|
||||||
forceLoadPost={forceLoadPost}
|
forceLoadPost={forceLoadPost}
|
||||||
|
@ -143,11 +143,9 @@ class PromoteView extends PureComponent {
|
|||||||
<Fragment>
|
<Fragment>
|
||||||
<View style={styles.autocomplateLineContainer}>
|
<View style={styles.autocomplateLineContainer}>
|
||||||
<View style={styles.autocomplateLabelContainer}>
|
<View style={styles.autocomplateLabelContainer}>
|
||||||
{
|
<Text style={styles.autocomplateLabelText}>
|
||||||
<Text style={styles.autocomplateLabelText}>
|
{intl.formatMessage({ id: 'promote.permlink' })}
|
||||||
{intl.formatMessage({ id: 'promote.permlink' })}
|
</Text>
|
||||||
</Text>
|
|
||||||
}
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable react/no-unused-state */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { View, Dimensions, Text } from 'react-native';
|
import { View, Dimensions, Text } from 'react-native';
|
||||||
import MultiSlider from '@ptomasroos/react-native-multi-slider';
|
import MultiSlider from '@ptomasroos/react-native-multi-slider';
|
||||||
@ -82,3 +83,4 @@ export default class ScaleSliderView extends Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -76,7 +76,7 @@ const SearchModalContainer = ({
|
|||||||
const result = {};
|
const result = {};
|
||||||
const metadata = JSON.parse(get(post, 'json_metadata', ''));
|
const metadata = JSON.parse(get(post, 'json_metadata', ''));
|
||||||
if (get(metadata, 'image', false) && metadata.image.length > 0) {
|
if (get(metadata, 'image', false) && metadata.image.length > 0) {
|
||||||
result.image = metadata.image[0];
|
[result.image] = metadata.image;
|
||||||
} else {
|
} else {
|
||||||
result.image = getResizedAvatar(author);
|
result.image = getResizedAvatar(author);
|
||||||
}
|
}
|
||||||
|
@ -30,14 +30,6 @@ class SideMenuContainer extends Component {
|
|||||||
|
|
||||||
// Component Life Cycle Functions
|
// Component Life Cycle Functions
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { isLoggedIn } = this.props;
|
|
||||||
|
|
||||||
if (isLoggedIn) {
|
|
||||||
this._createUserList(nextProps.otherAccounts);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_createUserList = otherAccounts => {
|
_createUserList = otherAccounts => {
|
||||||
const { currentAccount } = this.props;
|
const { currentAccount } = this.props;
|
||||||
|
|
||||||
@ -92,6 +84,14 @@ class SideMenuContainer extends Component {
|
|||||||
dispatch(logout());
|
dispatch(logout());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { isLoggedIn } = this.props;
|
||||||
|
|
||||||
|
if (isLoggedIn) {
|
||||||
|
this._createUserList(nextProps.otherAccounts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { currentAccount, isLoggedIn } = this.props;
|
const { currentAccount, isLoggedIn } = this.props;
|
||||||
const { accounts } = this.state;
|
const { accounts } = this.state;
|
||||||
|
@ -42,19 +42,6 @@ class SideMenuView extends Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { isLoggedIn, accounts } = this.props;
|
|
||||||
const { isAddAccountIconActive } = this.state;
|
|
||||||
|
|
||||||
if (isLoggedIn !== nextProps.isLoggedIn) {
|
|
||||||
this._setMenuItems(nextProps.isLoggedIn);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (accounts !== nextProps.accounts && isAddAccountIconActive) {
|
|
||||||
this.setState({ menuItems: nextProps.accounts });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
|
|
||||||
_handleOnPressAddAccountIcon = () => {
|
_handleOnPressAddAccountIcon = () => {
|
||||||
@ -91,6 +78,19 @@ class SideMenuView extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { isLoggedIn, accounts } = this.props;
|
||||||
|
const { isAddAccountIconActive } = this.state;
|
||||||
|
|
||||||
|
if (isLoggedIn !== nextProps.isLoggedIn) {
|
||||||
|
this._setMenuItems(nextProps.isLoggedIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (accounts !== nextProps.accounts && isAddAccountIconActive) {
|
||||||
|
this.setState({ menuItems: nextProps.accounts });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { currentAccount, isLoggedIn, intl, handleLogout } = this.props;
|
const { currentAccount, isLoggedIn, intl, handleLogout } = this.props;
|
||||||
const { menuItems, isAddAccountIconActive, storageT } = this.state;
|
const { menuItems, isAddAccountIconActive, storageT } = this.state;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable react/no-this-in-sfc */
|
||||||
import React, { useState, Fragment } from 'react';
|
import React, { useState, Fragment } from 'react';
|
||||||
import { Image, Text, View } from 'react-native';
|
import { Image, Text, View } from 'react-native';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
@ -82,9 +83,11 @@ const SpinGameView = ({
|
|||||||
handleOnButtonPress={id => buyItem(id)}
|
handleOnButtonPress={id => buyItem(id)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<Text style={styles.nextDate}>{`${intl.formatMessage({
|
<Text style={styles.nextDate}>
|
||||||
id: 'free_estm.timer_text',
|
{`${intl.formatMessage({
|
||||||
})} ${moment.utc(moment(nextDate).diff(new Date())).format('H:m')}`}</Text>
|
id: 'free_estm.timer_text',
|
||||||
|
})} ${moment.utc(moment(nextDate).diff(new Date())).format('H:m')}`}
|
||||||
|
</Text>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
@ -96,3 +99,4 @@ const SpinGameView = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
export { SpinGameView as SpinGame };
|
export { SpinGameView as SpinGame };
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -17,11 +17,6 @@ class ToastNotification extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycles
|
|
||||||
componentWillMount() {
|
|
||||||
this._showToast();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
_showToast() {
|
_showToast() {
|
||||||
const { duration } = this.props;
|
const { duration } = this.props;
|
||||||
@ -53,6 +48,11 @@ class ToastNotification extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Component Life Cycles
|
||||||
|
UNSAFE_componentWillMount() {
|
||||||
|
this._showToast();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { text, textStyle, style, onPress, isTop } = this.props;
|
const { text, textStyle, style, onPress, isTop } = this.props;
|
||||||
const { animatedValue } = this.state;
|
const { animatedValue } = this.state;
|
||||||
|
@ -28,9 +28,6 @@ class ToggleSwitchView extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycles
|
// Component Life Cycles
|
||||||
componentWillMount() {
|
|
||||||
this.setState({ duration: 0 });
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.setState({ duration: 300 });
|
this.setState({ duration: 300 });
|
||||||
@ -96,6 +93,10 @@ class ToggleSwitchView extends PureComponent {
|
|||||||
}).start();
|
}).start();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillMount() {
|
||||||
|
this.setState({ duration: 0 });
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
this._triggerAnimation();
|
this._triggerAnimation();
|
||||||
|
|
||||||
|
@ -94,3 +94,4 @@ const TransactionView = ({ transactions, type, refreshing, setRefreshing, isLoad
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default TransactionView;
|
export default TransactionView;
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -48,24 +48,6 @@ class UpvoteView extends Component {
|
|||||||
this._calculateEstimatedAmount();
|
this._calculateEstimatedAmount();
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { isVoted, upvotePercent } = this.props;
|
|
||||||
const { isVoted: localIsVoted } = this.state;
|
|
||||||
|
|
||||||
if (isVoted !== get(nextProps, 'isVoted') && localIsVoted !== get(nextProps, 'isVoted')) {
|
|
||||||
this.setState({ isVoted: get(nextProps, 'isVoted') });
|
|
||||||
}
|
|
||||||
|
|
||||||
if (upvotePercent !== get(nextProps, 'upvotePercent')) {
|
|
||||||
this.setState({
|
|
||||||
sliderValue:
|
|
||||||
get(nextProps, 'isVoted', false) ||
|
|
||||||
get(nextProps, 'isDownVoted', 1) ||
|
|
||||||
get(nextProps, 'upvotePercent', 1),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
_calculateEstimatedAmount = async () => {
|
_calculateEstimatedAmount = async () => {
|
||||||
const { currentAccount, globalProps } = this.props;
|
const { currentAccount, globalProps } = this.props;
|
||||||
@ -187,6 +169,24 @@ class UpvoteView extends Component {
|
|||||||
}, 300);
|
}, 300);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { isVoted, upvotePercent } = this.props;
|
||||||
|
const { isVoted: localIsVoted } = this.state;
|
||||||
|
|
||||||
|
if (isVoted !== get(nextProps, 'isVoted') && localIsVoted !== get(nextProps, 'isVoted')) {
|
||||||
|
this.setState({ isVoted: get(nextProps, 'isVoted') });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (upvotePercent !== get(nextProps, 'upvotePercent')) {
|
||||||
|
this.setState({
|
||||||
|
sliderValue:
|
||||||
|
get(nextProps, 'isVoted', false) ||
|
||||||
|
get(nextProps, 'isDownVoted', 1) ||
|
||||||
|
get(nextProps, 'upvotePercent', 1),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
isDecinedPayout,
|
isDecinedPayout,
|
||||||
@ -204,7 +204,7 @@ class UpvoteView extends Component {
|
|||||||
const { isVoting, amount, sliderValue, isVoted, isShowDetails, downvote } = this.state;
|
const { isVoting, amount, sliderValue, isVoted, isShowDetails, downvote } = this.state;
|
||||||
|
|
||||||
let iconName = 'upcircleo';
|
let iconName = 'upcircleo';
|
||||||
let iconType = 'AntDesign';
|
const iconType = 'AntDesign';
|
||||||
let downVoteIconName = 'downcircleo';
|
let downVoteIconName = 'downcircleo';
|
||||||
|
|
||||||
if (isVoted) {
|
if (isVoted) {
|
||||||
|
@ -36,7 +36,7 @@ class UserAvatarView extends Component {
|
|||||||
const routeName = name === username ? ROUTES.TABBAR.PROFILE : ROUTES.SCREENS.PROFILE;
|
const routeName = name === username ? ROUTES.TABBAR.PROFILE : ROUTES.SCREENS.PROFILE;
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
routeName: routeName,
|
routeName,
|
||||||
params: {
|
params: {
|
||||||
username,
|
username,
|
||||||
},
|
},
|
||||||
|
@ -131,3 +131,4 @@ const WalletView = ({ setEstimatedWalletValue, selectedUser, handleOnScroll }) =
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default WalletView;
|
export default WalletView;
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -81,9 +81,7 @@ const WalletHeaderView = ({
|
|||||||
>
|
>
|
||||||
<View style={styles.mainButtonWrapper}>
|
<View style={styles.mainButtonWrapper}>
|
||||||
<Text style={styles.unclaimedText}>
|
<Text style={styles.unclaimedText}>
|
||||||
{unclaimedBalance
|
{unclaimedBalance || intl.formatMessage({ id: `wallet.${type}.buy` })}
|
||||||
? unclaimedBalance
|
|
||||||
: intl.formatMessage({ id: `wallet.${type}.buy` })}
|
|
||||||
</Text>
|
</Text>
|
||||||
<View style={styles.mainIconWrapper}>
|
<View style={styles.mainIconWrapper}>
|
||||||
<Icon name="add" iconType="MaterialIcons" color="#357ce6" size={23} />
|
<Icon name="add" iconType="MaterialIcons" color="#357ce6" size={23} />
|
||||||
@ -115,3 +113,4 @@ const WalletHeaderView = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default withNavigation(WalletHeaderView);
|
export default withNavigation(WalletHeaderView);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
export const POPULAR_FILTERS = ['FEED', 'TOP', 'HOT', 'NEW'];
|
export const POPULAR_FILTERS = ['FEED', 'TOP', 'HOT', 'NEW'];
|
||||||
export const POPULAR_FILTERS_VALUE = ['feed', 'trending', 'hot', 'created'];
|
export const POPULAR_FILTERS_VALUE = ['feed', 'trending', 'hot', 'created'];
|
||||||
|
|
||||||
|
export const GLOBAL_POST_FILTERS = ['TOP', 'HOT', 'NEW'];
|
||||||
|
export const GLOBAL_POST_FILTERS_VALUE = ['trending', 'hot', 'created'];
|
||||||
|
|
||||||
export const PROFILE_FILTERS = ['BLOG', 'FEED'];
|
export const PROFILE_FILTERS = ['BLOG', 'FEED'];
|
||||||
export const PROFILE_FILTERS_VALUE = ['blog', 'feed'];
|
export const PROFILE_FILTERS_VALUE = ['blog', 'feed'];
|
||||||
|
|
||||||
|
@ -31,3 +31,4 @@ const mapStateToProps = state => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(AccountContainer);
|
export default connect(mapStateToProps)(AccountContainer);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -15,7 +15,7 @@ class AccountListContainer extends Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
data: props.data,
|
data: props.data,
|
||||||
filterResult: null,
|
filterResult: null,
|
||||||
filterIndex: '0',
|
filterIndex: 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ class AccountListContainer extends Component {
|
|||||||
return itemName.indexOf(_text) > -1;
|
return itemName.indexOf(_text) > -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (filterIndex !== '0') {
|
if (filterIndex !== 0) {
|
||||||
this._handleOnVotersDropdownSelect(filterIndex, '', newData);
|
this._handleOnVotersDropdownSelect(filterIndex, '', newData);
|
||||||
} else {
|
} else {
|
||||||
this.setState({ filterResult: newData });
|
this.setState({ filterResult: newData });
|
||||||
@ -45,13 +45,13 @@ class AccountListContainer extends Component {
|
|||||||
const _data = Object.assign([], oldData || data);
|
const _data = Object.assign([], oldData || data);
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case '0':
|
case 0:
|
||||||
_data.sort((a, b) => Number(b.value) - Number(a.value));
|
_data.sort((a, b) => Number(b.value) - Number(a.value));
|
||||||
break;
|
break;
|
||||||
case '1':
|
case 1:
|
||||||
_data.sort((a, b) => b.percent - a.percent);
|
_data.sort((a, b) => b.percent - a.percent);
|
||||||
break;
|
break;
|
||||||
case '2':
|
case 2:
|
||||||
_data.sort((a, b) => (isBefore(a.time, b.time) ? 1 : -1));
|
_data.sort((a, b) => (isBefore(a.time, b.time) ? 1 : -1));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -74,7 +74,7 @@ class AccountListContainer extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data, filterResult } = this.state;
|
const { data, filterResult, filterIndex } = this.state;
|
||||||
const { children } = this.props;
|
const { children } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -82,6 +82,7 @@ class AccountListContainer extends Component {
|
|||||||
children({
|
children({
|
||||||
data,
|
data,
|
||||||
filterResult,
|
filterResult,
|
||||||
|
filterIndex,
|
||||||
handleOnVotersDropdownSelect: this._handleOnVotersDropdownSelect,
|
handleOnVotersDropdownSelect: this._handleOnVotersDropdownSelect,
|
||||||
handleSearch: this._handleSearch,
|
handleSearch: this._handleSearch,
|
||||||
handleOnUserPress: this._handleOnUserPress,
|
handleOnUserPress: this._handleOnUserPress,
|
||||||
|
@ -173,3 +173,4 @@ const mapStateToProps = state => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default withNavigation(injectIntl(connect(mapStateToProps)(InAppPurchaseContainer)));
|
export default withNavigation(injectIntl(connect(mapStateToProps)(InAppPurchaseContainer)));
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -38,3 +38,4 @@ const mapStateToProps = state => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(LoggedInContainer);
|
export default connect(mapStateToProps)(LoggedInContainer);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -76,36 +76,6 @@ class ProfileContainer extends Component {
|
|||||||
this._loadProfile(targetUsername);
|
this._loadProfile(targetUsername);
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
if (!nextProps.isConnected) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { isLoggedIn, navigation } = this.props;
|
|
||||||
const { isOwnProfile } = this.state;
|
|
||||||
|
|
||||||
if (isLoggedIn && !nextProps.isLoggedIn) {
|
|
||||||
navigation.navigate(ROUTES.SCREENS.LOGIN);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isOwnProfile) {
|
|
||||||
const { user } = this.state;
|
|
||||||
const { activeBottomTab, currentAccount } = this.props;
|
|
||||||
|
|
||||||
const currentUsername =
|
|
||||||
get(currentAccount, 'name') !== get(nextProps, 'currentAccount.name') &&
|
|
||||||
get(nextProps, 'currentAccount.name');
|
|
||||||
const isActiveTabChanged =
|
|
||||||
activeBottomTab !== get(nextProps, 'activeBottomTab') &&
|
|
||||||
get(nextProps, 'activeBottomTab') === ROUTES.TABBAR.PROFILE;
|
|
||||||
|
|
||||||
if ((isActiveTabChanged && user) || currentUsername) {
|
|
||||||
this._loadProfile(get(nextProps, 'currentAccount.name'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_getReplies = async user => {
|
_getReplies = async user => {
|
||||||
const { isOwnProfile } = this.state;
|
const { isOwnProfile } = this.state;
|
||||||
let repliesAction;
|
let repliesAction;
|
||||||
@ -318,6 +288,36 @@ class ProfileContainer extends Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
if (!nextProps.isConnected) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { isLoggedIn, navigation } = this.props;
|
||||||
|
const { isOwnProfile } = this.state;
|
||||||
|
|
||||||
|
if (isLoggedIn && !nextProps.isLoggedIn) {
|
||||||
|
navigation.navigate(ROUTES.SCREENS.LOGIN);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isOwnProfile) {
|
||||||
|
const { user } = this.state;
|
||||||
|
const { activeBottomTab, currentAccount } = this.props;
|
||||||
|
|
||||||
|
const currentUsername =
|
||||||
|
get(currentAccount, 'name') !== get(nextProps, 'currentAccount.name') &&
|
||||||
|
get(nextProps, 'currentAccount.name');
|
||||||
|
const isActiveTabChanged =
|
||||||
|
activeBottomTab !== get(nextProps, 'activeBottomTab') &&
|
||||||
|
get(nextProps, 'activeBottomTab') === ROUTES.TABBAR.PROFILE;
|
||||||
|
|
||||||
|
if ((isActiveTabChanged && user) || currentUsername) {
|
||||||
|
this._loadProfile(get(nextProps, 'currentAccount.name'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
avatar,
|
avatar,
|
||||||
@ -399,3 +399,4 @@ const mapStateToProps = state => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(withNavigation(ProfileContainer));
|
export default connect(mapStateToProps)(withNavigation(ProfileContainer));
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { useState, useEffect, useCallback } from 'react';
|
import React, { useState, useEffect, useCallback } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect, useDispatch } from 'react-redux';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
import { useDispatch } from 'react-redux';
|
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
import { toastNotification } from '../redux/actions/uiAction';
|
import { toastNotification } from '../redux/actions/uiAction';
|
||||||
|
|
||||||
@ -239,8 +239,8 @@ const WalletContainer = ({
|
|||||||
claimRewardBalance: _claimRewardBalance,
|
claimRewardBalance: _claimRewardBalance,
|
||||||
currentAccountUsername: currentAccount.name,
|
currentAccountUsername: currentAccount.name,
|
||||||
handleOnWalletRefresh: _handleOnWalletRefresh,
|
handleOnWalletRefresh: _handleOnWalletRefresh,
|
||||||
isClaiming: isClaiming,
|
isClaiming,
|
||||||
refreshing: refreshing,
|
refreshing,
|
||||||
selectedUsername: get(selectedUser, 'name', ''),
|
selectedUsername: get(selectedUser, 'name', ''),
|
||||||
isLoading,
|
isLoading,
|
||||||
walletData,
|
walletData,
|
||||||
|
@ -16,3 +16,4 @@ const mapStateToProps = state => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(ThemeContainer);
|
export default connect(mapStateToProps)(ThemeContainer);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -4,7 +4,7 @@ import imageApi from '../../config/imageApi';
|
|||||||
import serverList from '../../config/serverListApi';
|
import serverList from '../../config/serverListApi';
|
||||||
import { jsonStringify } from '../../utils/jsonUtils';
|
import { jsonStringify } from '../../utils/jsonUtils';
|
||||||
import bugsnag from '../../config/bugsnag';
|
import bugsnag from '../../config/bugsnag';
|
||||||
//market-data/currency-rate/USD/estm
|
// market-data/currency-rate/USD/estm
|
||||||
export const getCurrencyRate = currency =>
|
export const getCurrencyRate = currency =>
|
||||||
api
|
api
|
||||||
.get(`/market-data/currency-rate/${currency.toUpperCase()}/steem`)
|
.get(`/market-data/currency-rate/${currency.toUpperCase()}/steem`)
|
||||||
@ -347,8 +347,6 @@ export const getNodes = () =>
|
|||||||
'https://rpc.buildteam.io',
|
'https://rpc.buildteam.io',
|
||||||
'https://rpc.steemviz.com',
|
'https://rpc.steemviz.com',
|
||||||
'https://api.steem.house',
|
'https://api.steem.house',
|
||||||
'https://steemd.pevo.science',
|
|
||||||
'https://steemd.minnowsupportproject.org',
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1249,3 +1249,4 @@ const getActiveKey = (local, pin) => {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -96,11 +96,6 @@ class ApplicationContainer extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
|
||||||
const { isDarkTheme: _isDarkTheme } = this.props;
|
|
||||||
EStyleSheet.build(_isDarkTheme ? darkTheme : lightTheme);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
const { isIos } = this.state;
|
const { isIos } = this.state;
|
||||||
this._setNetworkListener();
|
this._setNetworkListener();
|
||||||
@ -127,38 +122,6 @@ class ApplicationContainer extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const {
|
|
||||||
isDarkTheme: _isDarkTheme,
|
|
||||||
selectedLanguage,
|
|
||||||
isLogingOut,
|
|
||||||
isConnected,
|
|
||||||
api,
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
if (
|
|
||||||
_isDarkTheme !== nextProps.isDarkTheme ||
|
|
||||||
selectedLanguage !== nextProps.selectedLanguage ||
|
|
||||||
(api !== nextProps.api && nextProps.api)
|
|
||||||
) {
|
|
||||||
this.setState({ isRenderRequire: false }, () => this.setState({ isRenderRequire: true }));
|
|
||||||
if (nextProps.isDarkTheme) {
|
|
||||||
changeNavigationBarColor('#1e2835');
|
|
||||||
} else {
|
|
||||||
changeNavigationBarColor('#FFFFFF', true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isLogingOut !== nextProps.isLogingOut && nextProps.isLogingOut) {
|
|
||||||
this._logout();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isConnected !== null && isConnected !== nextProps.isConnected && nextProps.isConnected) {
|
|
||||||
this._fetchApp();
|
|
||||||
this.globalInterval = setInterval(this._refreshGlobalProps, 180000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
const { isIos } = this.state;
|
const { isIos } = this.state;
|
||||||
const { isPinCodeOpen: _isPinCodeOpen } = this.props;
|
const { isPinCodeOpen: _isPinCodeOpen } = this.props;
|
||||||
@ -531,7 +494,7 @@ class ApplicationContainer extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_connectNotificationServer = username => {
|
_connectNotificationServer = username => {
|
||||||
/*eslint no-undef: "warn"*/
|
/* eslint no-undef: "warn" */
|
||||||
const ws = new WebSocket(`${Config.ACTIVITY_WEBSOCKET_URL}?user=${username}`);
|
const ws = new WebSocket(`${Config.ACTIVITY_WEBSOCKET_URL}?user=${username}`);
|
||||||
|
|
||||||
ws.onmessage = () => {
|
ws.onmessage = () => {
|
||||||
@ -613,6 +576,43 @@ class ApplicationContainer extends Component {
|
|||||||
dispatch(updateCurrentAccount(_currentAccount));
|
dispatch(updateCurrentAccount(_currentAccount));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const {
|
||||||
|
isDarkTheme: _isDarkTheme,
|
||||||
|
selectedLanguage,
|
||||||
|
isLogingOut,
|
||||||
|
isConnected,
|
||||||
|
api,
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
if (
|
||||||
|
_isDarkTheme !== nextProps.isDarkTheme ||
|
||||||
|
selectedLanguage !== nextProps.selectedLanguage ||
|
||||||
|
(api !== nextProps.api && nextProps.api)
|
||||||
|
) {
|
||||||
|
this.setState({ isRenderRequire: false }, () => this.setState({ isRenderRequire: true }));
|
||||||
|
if (nextProps.isDarkTheme) {
|
||||||
|
changeNavigationBarColor('#1e2835');
|
||||||
|
} else {
|
||||||
|
changeNavigationBarColor('#FFFFFF', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isLogingOut !== nextProps.isLogingOut && nextProps.isLogingOut) {
|
||||||
|
this._logout();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isConnected !== null && isConnected !== nextProps.isConnected && nextProps.isConnected) {
|
||||||
|
this._fetchApp();
|
||||||
|
this.globalInterval = setInterval(this._refreshGlobalProps, 180000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UNSAFE_componentWillMount() {
|
||||||
|
const { isDarkTheme: _isDarkTheme } = this.props;
|
||||||
|
EStyleSheet.build(_isDarkTheme ? darkTheme : lightTheme);
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
selectedLanguage,
|
selectedLanguage,
|
||||||
@ -672,3 +672,4 @@ export default connect(
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
)(injectIntl(ApplicationContainer));
|
)(injectIntl(ApplicationContainer));
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -27,7 +27,13 @@ class ApplicationScreen extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
_handleOnHideToastNotification = () => {
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
dispatch(toastNotificationAction(''));
|
||||||
|
this.setState({ isShowToastNotification: false });
|
||||||
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillMount() {
|
||||||
const { isDarkTheme } = this.props;
|
const { isDarkTheme } = this.props;
|
||||||
EStyleSheet.build(isDarkTheme ? darkTheme : lightTheme);
|
EStyleSheet.build(isDarkTheme ? darkTheme : lightTheme);
|
||||||
}
|
}
|
||||||
@ -39,12 +45,6 @@ class ApplicationScreen extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_handleOnHideToastNotification = () => {
|
|
||||||
const { dispatch } = this.props;
|
|
||||||
dispatch(toastNotificationAction(''));
|
|
||||||
this.setState({ isShowToastNotification: false });
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isConnected, isDarkTheme, toastNotification, isReady } = this.props;
|
const { isConnected, isDarkTheme, toastNotification, isReady } = this.props;
|
||||||
const { isShowToastNotification } = this.state;
|
const { isShowToastNotification } = this.state;
|
||||||
|
@ -161,3 +161,4 @@ class DraftsScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default injectIntl(DraftsScreen);
|
export default injectIntl(DraftsScreen);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -54,67 +54,6 @@ class EditorContainer extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycle Functions
|
|
||||||
|
|
||||||
componentWillMount() {
|
|
||||||
const { currentAccount, navigation } = this.props;
|
|
||||||
const username = currentAccount && currentAccount.name ? currentAccount.name : '';
|
|
||||||
let isReply;
|
|
||||||
let isEdit;
|
|
||||||
let post;
|
|
||||||
let _draft;
|
|
||||||
|
|
||||||
if (navigation.state && navigation.state.params) {
|
|
||||||
const navigationParams = navigation.state.params;
|
|
||||||
|
|
||||||
if (navigationParams.draft) {
|
|
||||||
_draft = navigationParams.draft;
|
|
||||||
|
|
||||||
this.setState({
|
|
||||||
draftPost: {
|
|
||||||
title: _draft.title,
|
|
||||||
body: _draft.body,
|
|
||||||
tags: _draft.tags.includes(' ') ? _draft.tags.split(' ') : _draft.tags.split(','),
|
|
||||||
},
|
|
||||||
draftId: _draft._id,
|
|
||||||
isDraft: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (navigationParams.post) {
|
|
||||||
({ post } = navigationParams);
|
|
||||||
this.setState({ post });
|
|
||||||
}
|
|
||||||
|
|
||||||
if (navigationParams.isReply) {
|
|
||||||
({ isReply } = navigationParams);
|
|
||||||
this.setState({ isReply });
|
|
||||||
}
|
|
||||||
|
|
||||||
if (navigationParams.isEdit) {
|
|
||||||
({ isEdit } = navigationParams);
|
|
||||||
this.setState({
|
|
||||||
isEdit,
|
|
||||||
draftPost: {
|
|
||||||
title: get(post, 'title', ''),
|
|
||||||
body: get(post, 'markdownBody', ''),
|
|
||||||
tags: get(post, 'json_metadata.tags', []),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (navigationParams.action) {
|
|
||||||
this._handleRoutingAction(navigationParams.action);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.setState({ autoFocusText: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isEdit && !_draft) {
|
|
||||||
this._getDraft(username, isReply);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_getDraft = async (username, isReply) => {
|
_getDraft = async (username, isReply) => {
|
||||||
if (isReply) {
|
if (isReply) {
|
||||||
const draftReply = await AsyncStorage.getItem('temp-reply');
|
const draftReply = await AsyncStorage.getItem('temp-reply');
|
||||||
@ -311,7 +250,7 @@ class EditorContainer extends Component {
|
|||||||
|
|
||||||
const author = currentAccount.name;
|
const author = currentAccount.name;
|
||||||
const options = makeOptions(author, permlink);
|
const options = makeOptions(author, permlink);
|
||||||
const parentPermlink = fields.tags[0];
|
const parentPermlink = fields.tags[0] || 'hive-125125';
|
||||||
|
|
||||||
if (scheduleDate) {
|
if (scheduleDate) {
|
||||||
await this._setScheduledPost({
|
await this._setScheduledPost({
|
||||||
@ -553,6 +492,66 @@ class EditorContainer extends Component {
|
|||||||
this.setState({ uploadedImage: null });
|
this.setState({ uploadedImage: null });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Component Life Cycle Functions
|
||||||
|
UNSAFE_componentWillMount() {
|
||||||
|
const { currentAccount, navigation } = this.props;
|
||||||
|
const username = currentAccount && currentAccount.name ? currentAccount.name : '';
|
||||||
|
let isReply;
|
||||||
|
let isEdit;
|
||||||
|
let post;
|
||||||
|
let _draft;
|
||||||
|
|
||||||
|
if (navigation.state && navigation.state.params) {
|
||||||
|
const navigationParams = navigation.state.params;
|
||||||
|
|
||||||
|
if (navigationParams.draft) {
|
||||||
|
_draft = navigationParams.draft;
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
draftPost: {
|
||||||
|
title: _draft.title,
|
||||||
|
body: _draft.body,
|
||||||
|
tags: _draft.tags.includes(' ') ? _draft.tags.split(' ') : _draft.tags.split(','),
|
||||||
|
},
|
||||||
|
draftId: _draft._id,
|
||||||
|
isDraft: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (navigationParams.post) {
|
||||||
|
({ post } = navigationParams);
|
||||||
|
this.setState({ post });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (navigationParams.isReply) {
|
||||||
|
({ isReply } = navigationParams);
|
||||||
|
this.setState({ isReply });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (navigationParams.isEdit) {
|
||||||
|
({ isEdit } = navigationParams);
|
||||||
|
this.setState({
|
||||||
|
isEdit,
|
||||||
|
draftPost: {
|
||||||
|
title: get(post, 'title', ''),
|
||||||
|
body: get(post, 'markdownBody', ''),
|
||||||
|
tags: get(post, 'json_metadata.tags', []),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (navigationParams.action) {
|
||||||
|
this._handleRoutingAction(navigationParams.action);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.setState({ autoFocusText: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isEdit && !_draft) {
|
||||||
|
this._getDraft(username, isReply);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isLoggedIn, isDarkTheme } = this.props;
|
const { isLoggedIn, isDarkTheme } = this.props;
|
||||||
const {
|
const {
|
||||||
|
@ -166,8 +166,9 @@ class EditorScreen extends Component {
|
|||||||
_handleOnTagAdded = async tags => {
|
_handleOnTagAdded = async tags => {
|
||||||
const { fields: _fields } = this.state;
|
const { fields: _fields } = this.state;
|
||||||
const _tags = tags.filter(tag => tag && tag !== ' ');
|
const _tags = tags.filter(tag => tag && tag !== ' ');
|
||||||
|
const __tags = _tags.map(t => t.toLowerCase());
|
||||||
|
|
||||||
const fields = { ..._fields, tags: [..._tags] };
|
const fields = { ..._fields, tags: [...__tags] };
|
||||||
await this.setState({ fields, isRemoveTag: false });
|
await this.setState({ fields, isRemoveTag: false });
|
||||||
|
|
||||||
this._handleFormUpdate();
|
this._handleFormUpdate();
|
||||||
|
@ -25,7 +25,7 @@ const FeedScreen = () => {
|
|||||||
filterOptionsValue={[...POPULAR_FILTERS_VALUE]}
|
filterOptionsValue={[...POPULAR_FILTERS_VALUE]}
|
||||||
getFor={isLoggedIn ? 'feed' : 'trending'}
|
getFor={isLoggedIn ? 'feed' : 'trending'}
|
||||||
selectedOptionIndex={isLoggedIn ? 0 : 2}
|
selectedOptionIndex={isLoggedIn ? 0 : 2}
|
||||||
tag={get(currentAccount, 'name')}
|
feedUsername={get(currentAccount, 'name')}
|
||||||
/>
|
/>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
@ -67,3 +67,4 @@ class FollowsScreen extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default injectIntl(FollowsScreen);
|
export default injectIntl(FollowsScreen);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable react/no-unused-state */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Alert } from 'react-native';
|
import { Alert } from 'react-native';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
@ -35,20 +36,6 @@ class NotificationContainer extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { selectedFilter } = this.state;
|
|
||||||
const { username } = this.props;
|
|
||||||
|
|
||||||
if (
|
|
||||||
(nextProps.activeBottomTab === ROUTES.TABBAR.NOTIFICATION && nextProps.username) ||
|
|
||||||
(nextProps.username !== username && nextProps.username)
|
|
||||||
) {
|
|
||||||
this.setState({ endOfNotification: false }, () =>
|
|
||||||
this._getAvtivities(nextProps.username, selectedFilter),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_getAvtivities = (user, type = null, loadMore = false) => {
|
_getAvtivities = (user, type = null, loadMore = false) => {
|
||||||
const { lastNotificationId, notifications, endOfNotification } = this.state;
|
const { lastNotificationId, notifications, endOfNotification } = this.state;
|
||||||
const since = loadMore ? lastNotificationId : null;
|
const since = loadMore ? lastNotificationId : null;
|
||||||
@ -150,6 +137,20 @@ class NotificationContainer extends Component {
|
|||||||
await this.setState({ selectedFilter: value, endOfNotification: false, selectedIndex: ind });
|
await this.setState({ selectedFilter: value, endOfNotification: false, selectedIndex: ind });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { selectedFilter } = this.state;
|
||||||
|
const { username } = this.props;
|
||||||
|
|
||||||
|
if (
|
||||||
|
(nextProps.activeBottomTab === ROUTES.TABBAR.NOTIFICATION && nextProps.username) ||
|
||||||
|
(nextProps.username !== username && nextProps.username)
|
||||||
|
) {
|
||||||
|
this.setState({ endOfNotification: false }, () =>
|
||||||
|
this._getAvtivities(nextProps.username, selectedFilter),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isLoggedIn } = this.props;
|
const { isLoggedIn } = this.props;
|
||||||
const { notifications, isNotificationRefreshing } = this.state;
|
const { notifications, isNotificationRefreshing } = this.state;
|
||||||
@ -178,3 +179,4 @@ const mapStateToProps = state => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default injectIntl(connect(mapStateToProps)(NotificationContainer));
|
export default injectIntl(connect(mapStateToProps)(NotificationContainer));
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -3,8 +3,7 @@ import { useIntl } from 'react-intl';
|
|||||||
|
|
||||||
import { Text, TouchableOpacity, View } from 'react-native';
|
import { Text, TouchableOpacity, View } from 'react-native';
|
||||||
|
|
||||||
import { NumericKeyboard, PinAnimatedInput } from '../../../components';
|
import { NumericKeyboard, PinAnimatedInput, UserAvatar } from '../../../components';
|
||||||
import { UserAvatar } from '../../../components';
|
|
||||||
|
|
||||||
import styles from './pinCodeStyles';
|
import styles from './pinCodeStyles';
|
||||||
|
|
||||||
|
@ -44,17 +44,6 @@ class PostContainer extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
||||||
const { navigation } = this.props;
|
|
||||||
const { isFetch: nextIsFetch } = get(nextProps, 'navigation.state.params');
|
|
||||||
|
|
||||||
if (nextIsFetch) {
|
|
||||||
const { author, permlink } = get(navigation, 'state.params');
|
|
||||||
|
|
||||||
this._loadPost(author, permlink);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
|
|
||||||
_loadPost = async (author = null, permlink = null, isParentPost = false) => {
|
_loadPost = async (author = null, permlink = null, isParentPost = false) => {
|
||||||
@ -81,6 +70,17 @@ class PostContainer extends Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
|
const { navigation } = this.props;
|
||||||
|
const { isFetch: nextIsFetch } = get(nextProps, 'navigation.state.params');
|
||||||
|
|
||||||
|
if (nextIsFetch) {
|
||||||
|
const { author, permlink } = get(navigation, 'state.params');
|
||||||
|
|
||||||
|
this._loadPost(author, permlink);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { currentAccount, isLoggedIn } = this.props;
|
const { currentAccount, isLoggedIn } = this.props;
|
||||||
const { error, isNewPost, parentPost, post, isPostUnavailable, author } = this.state;
|
const { error, isNewPost, parentPost, post, isPostUnavailable, author } = this.state;
|
||||||
|
@ -10,7 +10,7 @@ import { SearchInput, Posts, TabBar } from '../../../components';
|
|||||||
import styles from './searchResultStyles';
|
import styles from './searchResultStyles';
|
||||||
import globalStyles from '../../../globalStyles';
|
import globalStyles from '../../../globalStyles';
|
||||||
|
|
||||||
import { POPULAR_FILTERS, POPULAR_FILTERS_VALUE } from '../../../constants/options/filters';
|
import { GLOBAL_POST_FILTERS, GLOBAL_POST_FILTERS_VALUE } from '../../../constants/options/filters';
|
||||||
|
|
||||||
const SearchResultScreen = ({ navigation }) => {
|
const SearchResultScreen = ({ navigation }) => {
|
||||||
const tag = navigation.getParam('tag', '');
|
const tag = navigation.getParam('tag', '');
|
||||||
@ -33,7 +33,7 @@ const SearchResultScreen = ({ navigation }) => {
|
|||||||
|
|
||||||
const _getSelectedIndex = () => {
|
const _getSelectedIndex = () => {
|
||||||
if (filter) {
|
if (filter) {
|
||||||
const selectedIndex = POPULAR_FILTERS_VALUE.indexOf(filter);
|
const selectedIndex = GLOBAL_POST_FILTERS_VALUE.indexOf(filter);
|
||||||
if (selectedIndex > 0) {
|
if (selectedIndex > 0) {
|
||||||
return selectedIndex;
|
return selectedIndex;
|
||||||
}
|
}
|
||||||
@ -54,8 +54,8 @@ const SearchResultScreen = ({ navigation }) => {
|
|||||||
<View tabLabel={intl.formatMessage({ id: 'search.posts' })} style={styles.tabbarItem}>
|
<View tabLabel={intl.formatMessage({ id: 'search.posts' })} style={styles.tabbarItem}>
|
||||||
<Posts
|
<Posts
|
||||||
key={tag}
|
key={tag}
|
||||||
filterOptions={POPULAR_FILTERS}
|
filterOptions={GLOBAL_POST_FILTERS}
|
||||||
filterOptionsValue={POPULAR_FILTERS_VALUE}
|
filterOptionsValue={GLOBAL_POST_FILTERS_VALUE}
|
||||||
selectedOptionIndex={_getSelectedIndex()}
|
selectedOptionIndex={_getSelectedIndex()}
|
||||||
tag={tag}
|
tag={tag}
|
||||||
/>
|
/>
|
||||||
|
@ -258,3 +258,4 @@ const SettingsScreen = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default injectIntl(SettingsScreen);
|
export default injectIntl(SettingsScreen);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -149,6 +149,7 @@ class DelegateScreen extends Component {
|
|||||||
parseToken(get(selectedAccount, 'delegated_vesting_shares'));
|
parseToken(get(selectedAccount, 'delegated_vesting_shares'));
|
||||||
}
|
}
|
||||||
const fixedAmount = `${amount.toFixed(6)} VESTS`;
|
const fixedAmount = `${amount.toFixed(6)} VESTS`;
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
const path = `sign/delegate-vesting-shares?delegator=${from}&delegatee=${destination}&vesting_shares=${encodeURIComponent(
|
const path = `sign/delegate-vesting-shares?delegator=${from}&delegatee=${destination}&vesting_shares=${encodeURIComponent(
|
||||||
fixedAmount,
|
fixedAmount,
|
||||||
)}`;
|
)}`;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable react/no-unused-state */
|
||||||
import React, { Fragment, Component } from 'react';
|
import React, { Fragment, Component } from 'react';
|
||||||
import { Text, View, ScrollView, Alert } from 'react-native';
|
import { Text, View, ScrollView, Alert } from 'react-native';
|
||||||
import ActionSheet from 'react-native-actionsheet';
|
import ActionSheet from 'react-native-actionsheet';
|
||||||
@ -48,13 +49,6 @@ class PowerDownView extends Component {
|
|||||||
this.stopActionSheet = React.createRef();
|
this.stopActionSheet = React.createRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycles
|
|
||||||
componentWillMount() {
|
|
||||||
const { currentAccountName } = this.props;
|
|
||||||
|
|
||||||
this._fetchRoutes(currentAccountName);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
|
|
||||||
_fetchRoutes = username => {
|
_fetchRoutes = username => {
|
||||||
@ -189,6 +183,13 @@ class PowerDownView extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Component Life Cycles
|
||||||
|
UNSAFE_componentWillMount() {
|
||||||
|
const { currentAccountName } = this.props;
|
||||||
|
|
||||||
|
this._fetchRoutes(currentAccountName);
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
accounts,
|
accounts,
|
||||||
@ -366,3 +367,4 @@ class PowerDownView extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default injectIntl(PowerDownView);
|
export default injectIntl(PowerDownView);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -34,7 +34,7 @@ class TransferView extends Component {
|
|||||||
destination: props.transferType === 'powerUp' ? props.currentAccountName : '',
|
destination: props.transferType === 'powerUp' ? props.currentAccountName : '',
|
||||||
amount: '',
|
amount: '',
|
||||||
memo: '',
|
memo: '',
|
||||||
isUsernameValid: props.transferType === 'powerUp' && props.currentAccountName ? true : false,
|
isUsernameValid: !!(props.transferType === 'powerUp' && props.currentAccountName),
|
||||||
steemConnectTransfer: false,
|
steemConnectTransfer: false,
|
||||||
isTransfering: false,
|
isTransfering: false,
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ const VotersScreen = ({ navigation }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<AccountListContainer data={activeVotes}>
|
<AccountListContainer data={activeVotes}>
|
||||||
{({ data, filterResult, handleOnVotersDropdownSelect, handleSearch }) => (
|
{({ data, filterResult, filterIndex, handleOnVotersDropdownSelect, handleSearch }) => (
|
||||||
<SafeAreaView style={globalStyles.container}>
|
<SafeAreaView style={globalStyles.container}>
|
||||||
<BasicHeader
|
<BasicHeader
|
||||||
title={`${headerTitle} (${data && data.length})`}
|
title={`${headerTitle} (${data && data.length})`}
|
||||||
@ -37,7 +37,10 @@ const VotersScreen = ({ navigation }) => {
|
|||||||
id: `voters_dropdown.${item}`,
|
id: `voters_dropdown.${item}`,
|
||||||
}),
|
}),
|
||||||
)}
|
)}
|
||||||
defaultText={intl.formatMessage({ id: `voters_dropdown.${filterOptions[0]}` })}
|
defaultText={intl.formatMessage({
|
||||||
|
id: `voters_dropdown.${filterOptions[filterIndex]}`,
|
||||||
|
})}
|
||||||
|
selectedOptionIndex={filterIndex}
|
||||||
onDropdownSelect={handleOnVotersDropdownSelect}
|
onDropdownSelect={handleOnVotersDropdownSelect}
|
||||||
/>
|
/>
|
||||||
<VotersDisplay votes={filterResult || data} />
|
<VotersDisplay votes={filterResult || data} />
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import createIntl from './createIntl';
|
import createIntl from './createIntl';
|
||||||
|
|
||||||
export const getDsteemDateErrorMessage = error => {
|
export const getDsteemDateErrorMessage = error => {
|
||||||
const intl = createIntl();
|
const intl = createIntl();
|
||||||
const trxTime = error.jse_info.stack[0].data['trx.expiration'];
|
const trxTime = error.jse_info.stack[0].data['trx.expiration'];
|
||||||
const now = error.jse_info.stack[0].data.now;
|
const { now } = error.jse_info.stack[0].data;
|
||||||
|
|
||||||
return `${intl.formatMessage({
|
return `${intl.formatMessage({
|
||||||
id: 'dsteem.date_error.device_time',
|
id: 'dsteem.date_error.device_time',
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable array-callback-return */
|
||||||
export default (posts, option) => {
|
export default (posts, option) => {
|
||||||
const updatedPosts = [];
|
const updatedPosts = [];
|
||||||
if (option === '1') {
|
if (option === '1') {
|
||||||
@ -18,3 +19,4 @@ export default (posts, option) => {
|
|||||||
return updatedPosts;
|
return updatedPosts;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -5,6 +5,7 @@ import get from 'lodash/get';
|
|||||||
import { postBodySummary, renderPostBody } from '@esteemapp/esteem-render-helpers';
|
import { postBodySummary, renderPostBody } from '@esteemapp/esteem-render-helpers';
|
||||||
|
|
||||||
// Dsteem
|
// Dsteem
|
||||||
|
// eslint-disable-next-line import/no-cycle
|
||||||
import { getActiveVotes } from '../providers/steem/dsteem';
|
import { getActiveVotes } from '../providers/steem/dsteem';
|
||||||
import { getPostReblogs } from '../providers/esteem/esteem';
|
import { getPostReblogs } from '../providers/esteem/esteem';
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ export default url => {
|
|||||||
url = url.replace('esteem://', 'https://esteem.app/');
|
url = url.replace('esteem://', 'https://esteem.app/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-useless-escape
|
||||||
const feedMatch = url.match(/^https:\/\/([\w-\.]*)\/([\w-]*)\/?([\w-]*)\/?$/);
|
const feedMatch = url.match(/^https:\/\/([\w-\.]*)\/([\w-]*)\/?([\w-]*)\/?$/);
|
||||||
|
|
||||||
if (feedMatch) {
|
if (feedMatch) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import parseToken from './parseToken';
|
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
|
import parseToken from './parseToken';
|
||||||
import { vestsToRshares } from './conversions';
|
import { vestsToRshares } from './conversions';
|
||||||
|
|
||||||
export const getEstimatedAmount = (account, globalProps, value = 100) => {
|
export const getEstimatedAmount = (account, globalProps, value = 100) => {
|
||||||
|
@ -9,7 +9,7 @@ export const groomingTransactionData = (transaction, steemPerMVests, formatNumbe
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
let result = { iconType: 'MaterialIcons' };
|
const result = { iconType: 'MaterialIcons' };
|
||||||
|
|
||||||
[result.textKey] = transaction[1].op;
|
[result.textKey] = transaction[1].op;
|
||||||
const opData = transaction[1].op[1];
|
const opData = transaction[1].op[1];
|
||||||
@ -172,7 +172,7 @@ export const groomingPointsTransactionData = transaction => {
|
|||||||
if (!transaction) {
|
if (!transaction) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
let result = { ...transaction };
|
const result = { ...transaction };
|
||||||
|
|
||||||
result.details = get(transaction, 'sender')
|
result.details = get(transaction, 'sender')
|
||||||
? `from @${get(transaction, 'sender')}`
|
? `from @${get(transaction, 'sender')}`
|
||||||
|
26
yarn.lock
26
yarn.lock
@ -7670,10 +7670,10 @@ react-native-safe-modules@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
debounce "^1.2.0"
|
debounce "^1.2.0"
|
||||||
|
|
||||||
react-native-screens@^2.0.0-alpha.15:
|
react-native-screens@^2.0.0-alpha.16:
|
||||||
version "2.0.0-alpha.15"
|
version "2.0.0-alpha.16"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.0.0-alpha.15.tgz#40ee432d5f9b6169494a8fd6997add1a8c4b41b3"
|
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.0.0-alpha.16.tgz#4675c0e9b8cbd6b9321bfd3881b5939d61aba72b"
|
||||||
integrity sha512-Nn4PRFSKLkP0MTXwqOIhMypJ7GMhcU+AZgFJd0DFQhNyU5sLNlKGEzQS6jRY+4MtHJnDXoMOr/o2l9WrI/O3Mg==
|
integrity sha512-CGa0LT+AksCgttrVfM3cp8VWxUz6xcInj+qCUY1Nvd2HQh4gP3WQtH3SDWvMC3pFy3CbK0CbXZz7UcZsG3pzwQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
debounce "^1.2.0"
|
debounce "^1.2.0"
|
||||||
|
|
||||||
@ -7713,10 +7713,10 @@ react-native-swiper@^1.6.0-rc.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
prop-types "^15.5.10"
|
prop-types "^15.5.10"
|
||||||
|
|
||||||
react-native-tab-view@^2.9.0:
|
react-native-tab-view@^2.11.0:
|
||||||
version "2.10.0"
|
version "2.11.0"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.10.0.tgz#5e249e5650502010013449ffd4e5edc18a95364b"
|
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.11.0.tgz#2e57d1f617ccc88c7f452708804f3409f880b700"
|
||||||
integrity sha512-qgexVz5eO4yaFjdkmn/sURXgVvaBo6pZD/q1eoca96SbPVbaH3WzVhF3bRUfeTHwZkXwznFTpS3JURqIFU8vQA==
|
integrity sha512-vqetlxGO7A8bnqvXcB50MWpRZAImXFrDGz1WCQKdCqe03Ey3ZzENe7yLuWrtBJYlepGfOLAsmCXv+wW82Yfm1w==
|
||||||
|
|
||||||
react-native-vector-icons@^6.6.0:
|
react-native-vector-icons@^6.6.0:
|
||||||
version "6.6.0"
|
version "6.6.0"
|
||||||
@ -7813,15 +7813,15 @@ react-navigation-stack@^1.9.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
prop-types "^15.7.2"
|
prop-types "^15.7.2"
|
||||||
|
|
||||||
react-navigation-tabs@^2.5.5:
|
react-navigation-tabs@^2.6.2:
|
||||||
version "2.5.5"
|
version "2.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-2.5.5.tgz#f651355b140b35ef5753aac434da5e1943abdd26"
|
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-2.6.2.tgz#6611f3bbc5fcbc004a96a457e1dbe8d957d09ef5"
|
||||||
integrity sha512-oIL5V4agCxcqbWNZzF1h/cm1bxKXNUeGrWaRQEEnuN3TXTEj1SVRz33CnKYg30pVvgF5L2p28sOk15Z4Ao01NQ==
|
integrity sha512-b7Bwio3pOyb2dJOsfICm1eXUCekULO63VitLlkslsuwB5v5qXD9u+TkuSGADPiAybRH3Fts4cQX/xA5WGsIsfg==
|
||||||
dependencies:
|
dependencies:
|
||||||
hoist-non-react-statics "^3.3.0"
|
hoist-non-react-statics "^3.3.0"
|
||||||
react-lifecycles-compat "^3.0.4"
|
react-lifecycles-compat "^3.0.4"
|
||||||
react-native-safe-area-view "^0.14.6"
|
react-native-safe-area-view "^0.14.6"
|
||||||
react-native-tab-view "^2.9.0"
|
react-native-tab-view "^2.11.0"
|
||||||
|
|
||||||
react-navigation@^4.0.10:
|
react-navigation@^4.0.10:
|
||||||
version "4.0.10"
|
version "4.0.10"
|
||||||
|
Loading…
Reference in New Issue
Block a user