inactivity notification route

This commit is contained in:
feruz 2021-03-03 10:03:40 +02:00
parent 70d864190d
commit 8b1d77ddfb
2 changed files with 8 additions and 0 deletions

View File

@ -435,6 +435,11 @@ class ApplicationContainer extends Component {
}; };
break; break;
case 'inactive':
routeName = ROUTES.SCREENS.EDITOR;
key = push.source || 'inactive';
break;
default: default:
break; break;
} }

View File

@ -45,6 +45,7 @@ class NotificationContainer extends Component {
this.setState({ isNotificationRefreshing: true }); this.setState({ isNotificationRefreshing: true });
getActivities({ user: user || username, type, since }) getActivities({ user: user || username, type, since })
.then((res) => { .then((res) => {
console.log(res);
const lastId = res.length > 0 ? [...res].pop().id : null; const lastId = res.length > 0 ? [...res].pop().id : null;
if (lastId === lastNotificationId || res.length === 0) { if (lastId === lastNotificationId || res.length === 0) {
this.setState({ this.setState({
@ -92,6 +93,8 @@ class NotificationContainer extends Component {
routeName = ROUTES.TABBAR.WALLET; routeName = ROUTES.TABBAR.WALLET;
} else if (type === 'spin') { } else if (type === 'spin') {
routeName = ROUTES.SCREENS.BOOST; routeName = ROUTES.SCREENS.BOOST;
} else if (type === 'inactive') {
routeName = ROUTES.SCREENS.EDITOR;
} }
if (routeName) { if (routeName) {