From f9a76bf19b4948218e2d1ada121b86b313842580 Mon Sep 17 00:00:00 2001 From: Feruz M Date: Thu, 28 Mar 2019 16:05:07 +0200 Subject: [PATCH 1/4] New translations en-US.json (Portuguese) --- src/config/locales/pt-PT.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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", From a8c55bd4166ed9821e2872a8813f90bc755fe17c Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Thu, 28 Mar 2019 17:15:42 +0300 Subject: [PATCH 2/4] Fix for #561 --- src/components/notification/view/notificationView.js | 4 +++- src/providers/esteem/esteem.js | 3 +++ .../notification/container/notificationContainer.js | 10 +++++++++- src/screens/notification/screen/notificationScreen.js | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) 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/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..c78ed75f3 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); } } @@ -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} /> ) : ( Date: Thu, 28 Mar 2019 16:18:08 +0200 Subject: [PATCH 3/4] New translations en-US.json (Indonesian) --- src/config/locales/id-ID.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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", From 4a3e042a1202fe52023e6749aa522d4ce3b11641 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Fri, 29 Mar 2019 14:35:20 +0300 Subject: [PATCH 4/4] Fixed some transfer notification issues --- .../notification/container/notificationContainer.js | 2 +- src/screens/profile/container/profileContainer.js | 6 +++++- src/screens/profile/screen/profileScreen.js | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/screens/notification/container/notificationContainer.js b/src/screens/notification/container/notificationContainer.js index c78ed75f3..ca03a8a3d 100644 --- a/src/screens/notification/container/notificationContainer.js +++ b/src/screens/notification/container/notificationContainer.js @@ -84,7 +84,7 @@ class NotificationContainer extends Component { }; } else if (data.type === 'transfer') { routeName = ROUTES.TABBAR.PROFILE; - params = { isWalletTab: true }; + params = { activePage: 2 }; } navigation.navigate({ diff --git a/src/screens/profile/container/profileContainer.js b/src/screens/profile/container/profileContainer.js index 8df955291..2047cc9f6 100644 --- a/src/screens/profile/container/profileContainer.js +++ b/src/screens/profile/container/profileContainer.js @@ -329,7 +329,10 @@ class ProfileContainer extends Component { user, username, } = this.state; - const { isDarkTheme, isLoggedIn, currency } = this.props; + const { + isDarkTheme, isLoggedIn, currency, navigation, + } = this.props; + const activePage = (navigation.state.params && navigation.state.params.activePage) || 0; return ( ); } 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 { ( )}