mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-23 21:35:04 +03:00
tag autolower
This commit is contained in:
parent
c80d0034d9
commit
5761039f97
@ -48,11 +48,19 @@
|
|||||||
"no-cycle": "off",
|
"no-cycle": "off",
|
||||||
"react-hooks/rules-of-hooks": "error",
|
"react-hooks/rules-of-hooks": "error",
|
||||||
"react-hooks/exhaustive-deps": "off",
|
"react-hooks/exhaustive-deps": "off",
|
||||||
|
"react/destructuring-assignment": [1, "always"],
|
||||||
"import/no-extraneous-dependencies": [
|
"import/no-extraneous-dependencies": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"devDependencies": true
|
"devDependencies": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"import/resolver": {
|
||||||
|
"node": {
|
||||||
|
"extensions": [".js", ".jsx"]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
@ -2,11 +2,11 @@ import { View, TouchableHighlight, Animated } from 'react-native';
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import Svg, { Circle, Path } from 'react-native-svg';
|
import Svg, { Circle, Path } from 'react-native-svg';
|
||||||
|
|
||||||
|
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);
|
||||||
@ -32,7 +32,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,
|
||||||
@ -142,7 +142,7 @@ const TabBarItem = ({ icon, selectedIcon, index, selected, onPress, showIcon, di
|
|||||||
if (selected) {
|
if (selected) {
|
||||||
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>
|
||||||
);
|
);
|
||||||
@ -153,7 +153,7 @@ const TabBarItem = ({ icon, selectedIcon, index, selected, onPress, showIcon, di
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TouchableHighlight
|
<TouchableHighlight
|
||||||
underlayColor={'transparent'}
|
underlayColor="transparent"
|
||||||
style={styles.navItem}
|
style={styles.navItem}
|
||||||
onPress={() => onPress(index, disabled)}
|
onPress={() => onPress(index, disabled)}
|
||||||
>
|
>
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,12 +32,12 @@ 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, TextArea, TitleArea } from './editorElements';
|
||||||
import { TabBar } from './tabBar';
|
import { TabBar } from './tabBar';
|
||||||
import { TextInput } from './textInput';
|
import { TextInput } from './textInput';
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
@ -82,9 +82,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>
|
||||||
|
@ -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,
|
||||||
},
|
},
|
||||||
|
@ -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} />
|
||||||
|
@ -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,
|
||||||
|
@ -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,
|
||||||
|
@ -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 */
|
||||||
|
@ -127,38 +127,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 +499,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 +581,38 @@ 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
selectedLanguage,
|
selectedLanguage,
|
||||||
@ -672,3 +672,4 @@ export default connect(
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
)(injectIntl(ApplicationContainer));
|
)(injectIntl(ApplicationContainer));
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -161,3 +161,4 @@ class DraftsScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default injectIntl(DraftsScreen);
|
export default injectIntl(DraftsScreen);
|
||||||
|
/* eslint-enable */
|
||||||
|
@ -311,7 +311,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({
|
||||||
|
@ -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();
|
||||||
|
@ -35,20 +35,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 +136,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;
|
||||||
|
@ -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;
|
||||||
|
@ -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,
|
||||||
)}`;
|
)}`;
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
@ -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';
|
||||||
|
|
||||||
|
@ -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')}`
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user