mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 11:21:41 +03:00
Merge remote-tracking branch 'upstream/development' into nt/posts_experimental
This commit is contained in:
commit
dda1ad5c0e
@ -27,7 +27,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@ecency/render-helper": "^2.0.16",
|
||||
"@ecency/render-helper": "^2.1.0",
|
||||
"@esteemapp/dhive": "0.15.0",
|
||||
"@esteemapp/react-native-autocomplete-input": "^4.2.1",
|
||||
"@esteemapp/react-native-modal-popover": "^0.0.15",
|
||||
|
@ -9,7 +9,7 @@ import { MainButton } from '../../mainButton';
|
||||
import { CollapsibleCard } from '../../collapsibleCard';
|
||||
import { WalletDetails } from '../../walletDetails';
|
||||
import { WalletDetailsPlaceHolder } from '../../basicUIElements';
|
||||
import { ThemeContainer, SteemWalletContainer } from '../../../containers';
|
||||
import { ThemeContainer, WalletContainer } from '../../../containers';
|
||||
|
||||
// Styles
|
||||
import styles from './walletStyles';
|
||||
@ -32,7 +32,7 @@ const WalletView = ({ setEstimatedWalletValue, selectedUser, handleOnScroll }) =
|
||||
);
|
||||
|
||||
return (
|
||||
<SteemWalletContainer
|
||||
<WalletContainer
|
||||
setEstimatedWalletValue={setEstimatedWalletValue}
|
||||
selectedUser={selectedUser}
|
||||
handleOnScroll={handleOnScroll}
|
||||
@ -115,7 +115,7 @@ const WalletView = ({ setEstimatedWalletValue, selectedUser, handleOnScroll }) =
|
||||
)}
|
||||
</ThemeContainer>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@ export default {
|
||||
nameKey: 'wallet.delegation',
|
||||
descriptionKey: 'wallet.delegation_desc',
|
||||
iconType: 'MaterialCommunityIcons',
|
||||
point: 5,
|
||||
point: 10,
|
||||
},
|
||||
100: {
|
||||
icon: 'pencil-outline',
|
||||
@ -77,7 +77,7 @@ export default {
|
||||
nameKey: 'wallet.login',
|
||||
descriptionKey: 'wallet.login_desc',
|
||||
iconType: 'MaterialIcons',
|
||||
point: 100,
|
||||
point: 10,
|
||||
},
|
||||
30: {
|
||||
icon: 'check-all',
|
||||
|
@ -6,7 +6,7 @@ import ProfileContainer from './profileContainer';
|
||||
import ProfileEditContainer from './profileEditContainer';
|
||||
import RedeemContainer from './redeemContainer';
|
||||
import SpinGameContainer from './spinGameContainer';
|
||||
import SteemWalletContainer from './steemWalletContainer';
|
||||
import WalletContainer from './walletContainer';
|
||||
import ThemeContainer from './themeContainer';
|
||||
import TransferContainer from './transferContainer';
|
||||
|
||||
@ -19,7 +19,7 @@ export {
|
||||
ProfileEditContainer,
|
||||
RedeemContainer,
|
||||
SpinGameContainer,
|
||||
SteemWalletContainer,
|
||||
WalletContainer,
|
||||
ThemeContainer,
|
||||
TransferContainer,
|
||||
};
|
||||
|
@ -23,6 +23,7 @@ import { getUser } from '../providers/ecency/ePoint';
|
||||
|
||||
// Utils
|
||||
import { countDecimals } from '../utils/number';
|
||||
import bugsnag from '../config/bugsnag';
|
||||
|
||||
/*
|
||||
* Props Name Description Value
|
||||
@ -195,7 +196,8 @@ class TransferContainer extends Component {
|
||||
})
|
||||
.catch((err) => {
|
||||
navigation.goBack();
|
||||
dispatch(toastNotification(err.message));
|
||||
bugsnag.notify(err);
|
||||
dispatch(toastNotification(intl.formatMessage({ id: 'alert.key_warning' })));
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -21,12 +21,12 @@ import { getEstimatedAmount } from '../utils/vote';
|
||||
// Constants
|
||||
import ROUTES from '../constants/routeNames';
|
||||
|
||||
const STEEM_DROPDOWN = ['purchase_estm', 'transfer_token', 'transfer_to_saving', 'powerUp'];
|
||||
const HIVE_DROPDOWN = ['purchase_estm', 'transfer_token', 'transfer_to_saving', 'powerUp'];
|
||||
const BTC_DROPDOWN = ['transfer_token'];
|
||||
const SBD_DROPDOWN = ['purchase_estm', 'transfer_token', 'transfer_to_saving', 'convert'];
|
||||
const SAVING_STEEM_DROPDOWN = ['withdraw_steem'];
|
||||
const SAVING_SBD_DROPDOWN = ['withdraw_sbd'];
|
||||
const STEEM_POWER_DROPDOWN = ['delegate', 'power_down'];
|
||||
const HBD_DROPDOWN = ['purchase_estm', 'transfer_token', 'transfer_to_saving', 'convert'];
|
||||
const SAVING_HIVE_DROPDOWN = ['withdraw_steem'];
|
||||
const SAVING_HBD_DROPDOWN = ['withdraw_sbd'];
|
||||
const HIVE_POWER_DROPDOWN = ['delegate', 'power_down'];
|
||||
|
||||
const WalletContainer = ({
|
||||
children,
|
||||
@ -302,12 +302,12 @@ const WalletContainer = ({
|
||||
estimatedSpValue,
|
||||
delegationsAmount,
|
||||
navigate: _navigate,
|
||||
steemDropdown: STEEM_DROPDOWN,
|
||||
sbdDropdown: SBD_DROPDOWN,
|
||||
steemDropdown: HIVE_DROPDOWN,
|
||||
sbdDropdown: HBD_DROPDOWN,
|
||||
btcDropdown: BTC_DROPDOWN,
|
||||
savingSteemDropdown: SAVING_STEEM_DROPDOWN,
|
||||
savingSbdDropdown: SAVING_SBD_DROPDOWN,
|
||||
steemPowerDropdown: STEEM_POWER_DROPDOWN,
|
||||
savingSteemDropdown: SAVING_HIVE_DROPDOWN,
|
||||
savingSbdDropdown: SAVING_HBD_DROPDOWN,
|
||||
steemPowerDropdown: HIVE_POWER_DROPDOWN,
|
||||
unclaimedBalance: unclaimedBalance && unclaimedBalance.trim(),
|
||||
estimatedAmount,
|
||||
})
|
@ -295,7 +295,7 @@ export const getCommunityTitle = async (tag) =>
|
||||
export const getCommunities = async (
|
||||
last = '',
|
||||
limit = 100,
|
||||
query = '',
|
||||
query = null,
|
||||
sort = 'rank',
|
||||
observer = '',
|
||||
) =>
|
||||
|
@ -435,6 +435,11 @@ class ApplicationContainer extends Component {
|
||||
};
|
||||
break;
|
||||
|
||||
case 'inactive':
|
||||
routeName = ROUTES.SCREENS.EDITOR;
|
||||
key = push.source || 'inactive';
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ class ApplicationScreen extends Component {
|
||||
{isShowToastNotification && (
|
||||
<ToastNotification
|
||||
text={toastNotification}
|
||||
duration={3000}
|
||||
duration={4000}
|
||||
onHide={this._handleOnHideToastNotification}
|
||||
/>
|
||||
)}
|
||||
|
@ -30,7 +30,7 @@ const CommunitiesContainer = ({ children, navigation }) => {
|
||||
useEffect(() => {
|
||||
getSubscriptions(currentAccount.username).then((subs) => {
|
||||
subs.forEach((item) => item.push(true));
|
||||
getCommunities('', 50, '', 'rank').then((communities) => {
|
||||
getCommunities('', 50, null, 'rank').then((communities) => {
|
||||
communities.forEach((community) =>
|
||||
Object.assign(community, {
|
||||
isSubscribed: subs.some(
|
||||
|
@ -2,8 +2,10 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { View, Text, FlatList, ActivityIndicator } from 'react-native';
|
||||
import { injectIntl } from 'react-intl';
|
||||
import { withNavigation } from 'react-navigation';
|
||||
|
||||
// Constants
|
||||
import ROUTES from '../../../constants/routeNames';
|
||||
|
||||
// Components
|
||||
import { BasicHeader, UserListItem } from '../../../components';
|
||||
@ -25,12 +27,29 @@ class FollowsScreen extends PureComponent {
|
||||
// Component Life Cycles
|
||||
|
||||
// Component Functions
|
||||
_handleOnUserPress = (username) => {
|
||||
const { navigation } = this.props;
|
||||
|
||||
navigation.navigate({
|
||||
routeName: ROUTES.SCREENS.PROFILE,
|
||||
params: {
|
||||
username,
|
||||
},
|
||||
key: username,
|
||||
});
|
||||
};
|
||||
|
||||
_renderItem = ({ item, index }) => {
|
||||
const { isFollowing } = this.props;
|
||||
const username = isFollowing ? item.following : item.follower;
|
||||
|
||||
return <UserListItem index={index} username={username} />;
|
||||
return (
|
||||
<UserListItem
|
||||
index={index}
|
||||
username={username}
|
||||
handleOnPress={() => this._handleOnUserPress(username)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
@ -66,5 +85,5 @@ class FollowsScreen extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
export default injectIntl(FollowsScreen);
|
||||
export default withNavigation(injectIntl(FollowsScreen));
|
||||
/* eslint-enable */
|
||||
|
@ -45,6 +45,7 @@ class NotificationContainer extends Component {
|
||||
this.setState({ isNotificationRefreshing: true });
|
||||
getActivities({ user: user || username, type, since })
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
const lastId = res.length > 0 ? [...res].pop().id : null;
|
||||
if (lastId === lastNotificationId || res.length === 0) {
|
||||
this.setState({
|
||||
@ -92,6 +93,8 @@ class NotificationContainer extends Component {
|
||||
routeName = ROUTES.TABBAR.WALLET;
|
||||
} else if (type === 'spin') {
|
||||
routeName = ROUTES.SCREENS.BOOST;
|
||||
} else if (type === 'inactive') {
|
||||
routeName = ROUTES.SCREENS.EDITOR;
|
||||
}
|
||||
|
||||
if (routeName) {
|
||||
|
@ -45,7 +45,7 @@ const CommunitiesResultsContainer = ({ children, navigation, searchValue }) => {
|
||||
setData([]);
|
||||
setNoResult(false);
|
||||
|
||||
getCommunities('', searchValue ? 100 : 20, searchValue, 'rank')
|
||||
getCommunities('', searchValue ? 100 : 20, searchValue || null, 'rank')
|
||||
.then((communities) => {
|
||||
if (currentAccount && currentAccount.username) {
|
||||
getSubscriptions(currentAccount.username).then((subs) => {
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import { WalletHeader, FormattedCurrency } from '../../../components';
|
||||
import { SteemWalletContainer, AccountContainer } from '../../../containers';
|
||||
import { WalletContainer, AccountContainer } from '../../../containers';
|
||||
|
||||
import globalStyles from '../../../globalStyles';
|
||||
|
||||
@ -10,7 +10,7 @@ const BtcView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
<View style={globalStyles.swipeItemWrapper}>
|
||||
<AccountContainer>
|
||||
{({ currentAccount }) => (
|
||||
<SteemWalletContainer selectedUser={currentAccount}>
|
||||
<WalletContainer selectedUser={currentAccount}>
|
||||
{({
|
||||
isClaiming,
|
||||
claimRewardBalance,
|
||||
@ -50,7 +50,7 @@ const BtcView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
)}
|
||||
</AccountContainer>
|
||||
</View>
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import { WalletHeader, FormattedCurrency } from '../../../components';
|
||||
import { SteemWalletContainer, AccountContainer } from '../../../containers';
|
||||
import { WalletContainer, AccountContainer } from '../../../containers';
|
||||
|
||||
import globalStyles from '../../../globalStyles';
|
||||
|
||||
@ -10,7 +10,7 @@ const SbdView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
<View style={globalStyles.swipeItemWrapper}>
|
||||
<AccountContainer>
|
||||
{({ currentAccount }) => (
|
||||
<SteemWalletContainer selectedUser={currentAccount}>
|
||||
<WalletContainer selectedUser={currentAccount}>
|
||||
{({
|
||||
isClaiming,
|
||||
claimRewardBalance,
|
||||
@ -52,7 +52,7 @@ const SbdView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
)}
|
||||
</AccountContainer>
|
||||
</View>
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { View, Text } from 'react-native';
|
||||
|
||||
import { WalletHeader, FormattedCurrency } from '../../../components';
|
||||
import { SteemWalletContainer, AccountContainer } from '../../../containers';
|
||||
import { WalletContainer, AccountContainer } from '../../../containers';
|
||||
|
||||
import globalStyles from '../../../globalStyles';
|
||||
|
||||
@ -10,7 +10,7 @@ const SpView = ({ handleOnSelected, index, currentIndex, refreshing: reload }) =
|
||||
<View style={globalStyles.swipeItemWrapper}>
|
||||
<AccountContainer>
|
||||
{({ currentAccount }) => (
|
||||
<SteemWalletContainer selectedUser={currentAccount}>
|
||||
<WalletContainer selectedUser={currentAccount}>
|
||||
{({
|
||||
isClaiming,
|
||||
claimRewardBalance,
|
||||
@ -66,7 +66,7 @@ const SpView = ({ handleOnSelected, index, currentIndex, refreshing: reload }) =
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
)}
|
||||
</AccountContainer>
|
||||
</View>
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import { WalletHeader, FormattedCurrency } from '../../../components';
|
||||
import { SteemWalletContainer, AccountContainer } from '../../../containers';
|
||||
import { WalletContainer, AccountContainer } from '../../../containers';
|
||||
|
||||
import globalStyles from '../../../globalStyles';
|
||||
|
||||
@ -10,7 +10,7 @@ const SteemView = ({ handleOnSelected, index, currentIndex, refreshing: reload }
|
||||
<View style={globalStyles.swipeItemWrapper}>
|
||||
<AccountContainer>
|
||||
{({ currentAccount }) => (
|
||||
<SteemWalletContainer selectedUser={currentAccount}>
|
||||
<WalletContainer selectedUser={currentAccount}>
|
||||
{({
|
||||
isClaiming,
|
||||
claimRewardBalance,
|
||||
@ -56,7 +56,7 @@ const SteemView = ({ handleOnSelected, index, currentIndex, refreshing: reload }
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
)}
|
||||
</AccountContainer>
|
||||
</View>
|
||||
|
@ -50,9 +50,10 @@ const WalletScreen = () => {
|
||||
<>
|
||||
<Animated.View style={[styles.header, { height: headerHeight }]}>
|
||||
<Swiper
|
||||
loop={false}
|
||||
loop={true}
|
||||
showsPagination={true}
|
||||
index={0}
|
||||
dotStyle={styles.dotStyle}
|
||||
onIndexChanged={(index) => setCurrentIndex(index)}
|
||||
>
|
||||
<EstmView
|
||||
|
@ -7,4 +7,7 @@ export default EStyleSheet.create({
|
||||
header: {
|
||||
backgroundColor: '$primaryBackgroundColor',
|
||||
},
|
||||
dotStyle: {
|
||||
backgroundColor: '$primaryDarkText',
|
||||
},
|
||||
});
|
||||
|
@ -698,10 +698,10 @@
|
||||
exec-sh "^0.3.2"
|
||||
minimist "^1.2.0"
|
||||
|
||||
"@ecency/render-helper@^2.0.16":
|
||||
version "2.0.16"
|
||||
resolved "https://registry.yarnpkg.com/@ecency/render-helper/-/render-helper-2.0.16.tgz#f67a6ffde8557e2b21d5bebf887570052376f42b"
|
||||
integrity sha512-Km+KhjVSLV10Ogql3Xv8VCKQQmbZwIE54LW2dtn3MezrqZmrGTB4Dcf/8JJAN0CKvKqd17EXsfm/ybHwE+DSZA==
|
||||
"@ecency/render-helper@^2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@ecency/render-helper/-/render-helper-2.1.0.tgz#826cc2d401942468516394f885bf329ed39fe30f"
|
||||
integrity sha512-gYOJRnHT9NaEY1J3bOlgMxudU4I0Egh5GjnUUbgno5IDASttcYX7poXlWBDmelawfPx/Atv0MYbfzPrhGamfYg==
|
||||
dependencies:
|
||||
he "^1.2.0"
|
||||
lru-cache "^5.1.1"
|
||||
|
Loading…
Reference in New Issue
Block a user