mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 19:01:38 +03:00
Merge pull request #1345 from esteemapp/notification-read
fix #1254, mark notifications as read when opened from push
This commit is contained in:
commit
1b309908b5
@ -38,7 +38,7 @@ import {
|
||||
} from '../../../realm/realm';
|
||||
import { getUser, getPost } from '../../../providers/steem/dsteem';
|
||||
import { switchAccount } from '../../../providers/steem/auth';
|
||||
import { setPushToken } from '../../../providers/esteem/esteem';
|
||||
import { setPushToken, markActivityAsRead } from '../../../providers/esteem/esteem';
|
||||
import { navigate } from '../../../navigation/service';
|
||||
|
||||
// Actions
|
||||
@ -307,6 +307,13 @@ class ApplicationContainer extends Component {
|
||||
const fullParentPermlink = `${parentPermlink1}${parentPermlink2}${parentPermlink3}`;
|
||||
const fullPermlink = `${permlink1}${permlink2}${permlink3}`;
|
||||
|
||||
const username = get(push, 'target', '');
|
||||
const activity_id = get(push, 'id', '');
|
||||
|
||||
markActivityAsRead(username, activity_id).then(result => {
|
||||
dispatch(updateUnreadActivityCount(result.unread));
|
||||
});
|
||||
|
||||
switch (type) {
|
||||
case 'vote':
|
||||
case 'unvote':
|
||||
|
Loading…
Reference in New Issue
Block a user