mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 12:51:42 +03:00
fix #1254, mark notifications as read when opened from push
This commit is contained in:
parent
19ffd36faa
commit
960491340d
@ -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