diff --git a/src/components/notification/view/notificationView.js b/src/components/notification/view/notificationView.js index 5347e3fcd..216ec9489 100644 --- a/src/components/notification/view/notificationView.js +++ b/src/components/notification/view/notificationView.js @@ -35,6 +35,7 @@ class NotificationView extends PureComponent { { key: 'mentions', value: 'MENTIONS' }, { key: 'follows', value: 'FOLLOWS' }, { key: 'reblogs', value: 'REBLOGS' }, + { key: 'transfers', value: 'TRANSFERS' }, ], selectedFilter: null, }; @@ -45,10 +46,11 @@ class NotificationView extends PureComponent { // Component Functions _handleOnDropdownSelect = (index) => { - const { getActivities } = this.props; + const { getActivities, changeSelectedFilter } = this.props; const { filters } = this.state; this.setState({ selectedFilter: filters[index].key }); + changeSelectedFilter(filters[index].key); getActivities(filters[index].key, false); }; diff --git a/src/config/locales/id-ID.json b/src/config/locales/id-ID.json index c1c930e6d..a69c5143e 100644 --- a/src/config/locales/id-ID.json +++ b/src/config/locales/id-ID.json @@ -58,19 +58,19 @@ }, "settings": { "settings": "Pengaturan", - "general": "General", + "general": "Umum", "currency": "Nilai Tukar Mata Uang", "language": "Bahasa", "server": "Server", "dark_theme": "Tema Gelap", "push_notification": "Notifikasi Gegas", "notification": { - "follow": "Follow", - "vote": "Vote", - "comment": "Comment", - "mention": "Mention", + "follow": "Ikuti", + "vote": "Berikan dukungan suara", + "comment": "Komentar", + "mention": "Menyebutkan", "reblog": "Reblog", - "transfers": "Transfers" + "transfers": "Transfer" }, "pincode": "Kode PIN", "reset": "Setel Ulang", diff --git a/src/config/locales/pt-PT.json b/src/config/locales/pt-PT.json index 61c6ee92e..29b6f543b 100644 --- a/src/config/locales/pt-PT.json +++ b/src/config/locales/pt-PT.json @@ -58,19 +58,19 @@ }, "settings": { "settings": "Configurações", - "general": "General", + "general": "Geral", "currency": "Moeda", "language": "Língua", "server": "Servidor", "dark_theme": "Tema Escuro", "push_notification": "Puxar Notificações", "notification": { - "follow": "Follow", - "vote": "Vote", - "comment": "Comment", - "mention": "Mention", - "reblog": "Reblog", - "transfers": "Transfers" + "follow": "Seguir", + "vote": "Votar", + "comment": "Comentar", + "mention": "Menção", + "reblog": "Republicar", + "transfers": "Transferências" }, "pincode": "Código PIN", "reset": "Reiniciar", diff --git a/src/providers/esteem/esteem.js b/src/providers/esteem/esteem.js index 2477aa1a6..bfcda0816 100644 --- a/src/providers/esteem/esteem.js +++ b/src/providers/esteem/esteem.js @@ -144,6 +144,9 @@ export const getActivities = data => new Promise((resolve, reject) => { case 'reblogs': url = `/reblogs/${data.user}`; break; + case 'transfers': + url = `/transfers/${data.user}`; + break; default: url = `/activities/${data.user}`; break; diff --git a/src/screens/notification/container/notificationContainer.js b/src/screens/notification/container/notificationContainer.js index 708bd6e92..ca03a8a3d 100644 --- a/src/screens/notification/container/notificationContainer.js +++ b/src/screens/notification/container/notificationContainer.js @@ -19,6 +19,7 @@ class NotificationContainer extends Component { lastNotificationId: null, notificationLoading: false, readAllNotificationLoading: false, + selectedFilter: 'activities', }; } @@ -31,8 +32,10 @@ class NotificationContainer extends Component { } componentWillReceiveProps(nextProps) { + const { selectedFilter } = this.state; + if (nextProps.activeBottomTab === ROUTES.TABBAR.NOTIFICATION && nextProps.username) { - this._getAvtivities(); + this._getAvtivities(selectedFilter); } } @@ -81,7 +84,7 @@ class NotificationContainer extends Component { }; } else if (data.type === 'transfer') { routeName = ROUTES.TABBAR.PROFILE; - params = { isWalletTab: true }; + params = { activePage: 2 }; } navigation.navigate({ @@ -110,6 +113,10 @@ class NotificationContainer extends Component { navigation.navigate(ROUTES.SCREENS.LOGIN); }; + _changeSelectedFilter = (value) => { + this.setState({ selectedFilter: value }); + }; + render() { const { isLoggedIn } = this.props; const { @@ -130,6 +137,7 @@ class NotificationContainer extends Component { notificationLoading={notificationLoading} readAllNotificationLoading={readAllNotificationLoading} isLoggedIn={isLoggedIn} + changeSelectedFilter={this._changeSelectedFilter} /> ); } diff --git a/src/screens/notification/screen/notificationScreen.js b/src/screens/notification/screen/notificationScreen.js index 399528d25..0bf310971 100644 --- a/src/screens/notification/screen/notificationScreen.js +++ b/src/screens/notification/screen/notificationScreen.js @@ -31,6 +31,7 @@ class NotificationScreen extends PureComponent { isLoggedIn, notificationLoading, readAllNotificationLoading, + changeSelectedFilter, } = this.props; return ( @@ -56,6 +57,7 @@ class NotificationScreen extends PureComponent { readAllNotification={readAllNotification} readAllNotificationLoading={readAllNotificationLoading} loading={notificationLoading} + changeSelectedFilter={changeSelectedFilter} /> ) : ( ); } diff --git a/src/screens/profile/screen/profileScreen.js b/src/screens/profile/screen/profileScreen.js index 966584835..19b065418 100644 --- a/src/screens/profile/screen/profileScreen.js +++ b/src/screens/profile/screen/profileScreen.js @@ -83,6 +83,7 @@ class ProfileScreen extends PureComponent { selectedQuickProfile, selectedUser, username, + activePage, } = this.props; const { @@ -118,8 +119,9 @@ class ProfileScreen extends PureComponent { if (estimatedWalletValue) { const { currencyRate, currencySymbol } = currency; - _estimatedWalletValue = `${currencySymbol} ${(estimatedWalletValue * currencyRate).toFixed( - )}`; + _estimatedWalletValue = `${currencySymbol} ${( + estimatedWalletValue * currencyRate + ).toFixed()}`; } return ( @@ -177,6 +179,7 @@ class ProfileScreen extends PureComponent { ( )}