mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-02 19:06:39 +03:00
Removed read all notification alert
This commit is contained in:
parent
ea1c0e644f
commit
99447628aa
@ -1,7 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Alert } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
import { injectIntl } from 'react-intl';
|
||||
|
||||
// Actions and Services
|
||||
import { getActivities, markActivityAsRead } from '../../../providers/esteem/esteem';
|
||||
@ -65,20 +63,12 @@ class NotificationContainer extends Component {
|
||||
};
|
||||
|
||||
_readAllNotification = () => {
|
||||
const { username, dispatch, intl } = this.props;
|
||||
const { username, dispatch } = this.props;
|
||||
const { notifications } = this.state;
|
||||
markActivityAsRead(username).then((result) => {
|
||||
dispatch(updateUnreadActivityCount(result.unread));
|
||||
const updatedNotifications = notifications.map(item => ({ ...item, read: 1 }));
|
||||
this.setState({ notifications: updatedNotifications });
|
||||
Alert.alert(
|
||||
intl.formatMessage({
|
||||
id: 'alert.success',
|
||||
}),
|
||||
intl.formatMessage({
|
||||
id: 'alert.allRead',
|
||||
}),
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
@ -102,4 +92,4 @@ const mapStateToProps = state => ({
|
||||
activeBottomTab: state.ui.activeBottomTab,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(NotificationContainer));
|
||||
export default connect(mapStateToProps)(NotificationContainer);
|
||||
|
Loading…
Reference in New Issue
Block a user