mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-30 09:07:28 +03:00
Merge branch 'master' of github.com:esteemapp/esteem-mobile
This commit is contained in:
commit
9a3b5b0399
@ -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);
|
||||
};
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -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}
|
||||
/>
|
||||
) : (
|
||||
<NoPost
|
||||
|
@ -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 (
|
||||
<ProfileScreen
|
||||
@ -356,6 +359,7 @@ class ProfileContainer extends Component {
|
||||
selectedQuickProfile={selectedQuickProfile}
|
||||
selectedUser={user}
|
||||
username={username}
|
||||
activePage={activePage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -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 {
|
||||
|
||||
<ScrollableTabView
|
||||
style={[globalStyles.tabView, styles.tabView]}
|
||||
initialPage={activePage}
|
||||
renderTabBar={() => (
|
||||
<TabBar style={styles.tabbar} tabUnderlineDefaultWidth={80} tabUnderlineScaleX={2} />
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user