...
 
Commits (2)
......@@ -23,27 +23,18 @@ exports[`Activity component renders correctly 1`] = `
<ThumbUpAction
entity={
Object {
"_list": Object {
"viewed": Object {
"addViewed": [Function],
"viewed": Map {
"1019155171608096768" => true,
},
},
},
"attachment_guid": false,
"blurb": false,
"containerObj": undefined,
"container_guid": "activityguid0",
"custom_data": false,
"custom_type": false,
"description": "Congratulations! ",
"edited": "",
"getThumbSource": [Function],
"guid": "activityguid0",
"mature": false,
"message": "Message",
"ownerObj": Object {
"getAvatarSource": [Function],
"guid": "824853017709780997",
"subtype": false,
"time_created": "1522036284",
......@@ -72,27 +63,18 @@ exports[`Activity component renders correctly 1`] = `
<ThumbDownAction
entity={
Object {
"_list": Object {
"viewed": Object {
"addViewed": [Function],
"viewed": Map {
"1019155171608096768" => true,
},
},
},
"attachment_guid": false,
"blurb": false,
"containerObj": undefined,
"container_guid": "activityguid0",
"custom_data": false,
"custom_type": false,
"description": "Congratulations! ",
"edited": "",
"getThumbSource": [Function],
"guid": "activityguid0",
"mature": false,
"message": "Message",
"ownerObj": Object {
"getAvatarSource": [Function],
"guid": "824853017709780997",
"subtype": false,
"time_created": "1522036284",
......@@ -121,7 +103,6 @@ exports[`Activity component renders correctly 1`] = `
<WireAction
owner={
Object {
"getAvatarSource": [Function],
"guid": "824853017709780997",
"subtype": false,
"time_created": "1522036284",
......@@ -132,27 +113,18 @@ exports[`Activity component renders correctly 1`] = `
<CommentsAction
entity={
Object {
"_list": Object {
"viewed": Object {
"addViewed": [Function],
"viewed": Map {
"1019155171608096768" => true,
},
},
},
"attachment_guid": false,
"blurb": false,
"containerObj": undefined,
"container_guid": "activityguid0",
"custom_data": false,
"custom_type": false,
"description": "Congratulations! ",
"edited": "",
"getThumbSource": [Function],
"guid": "activityguid0",
"mature": false,
"message": "Message",
"ownerObj": Object {
"getAvatarSource": [Function],
"guid": "824853017709780997",
"subtype": false,
"time_created": "1522036284",
......@@ -176,27 +148,18 @@ exports[`Activity component renders correctly 1`] = `
<RemindAction
entity={
Object {
"_list": Object {
"viewed": Object {
"addViewed": [Function],
"viewed": Map {
"1019155171608096768" => true,
},
},
},
"attachment_guid": false,
"blurb": false,
"containerObj": undefined,
"container_guid": "activityguid0",
"custom_data": false,
"custom_type": false,
"description": "Congratulations! ",
"edited": "",
"getThumbSource": [Function],
"guid": "activityguid0",
"mature": false,
"message": "Message",
"ownerObj": Object {
"getAvatarSource": [Function],
"guid": "824853017709780997",
"subtype": false,
"time_created": "1522036284",
......
import BaseModel from '../common/BaseModel';
/**
* Conversation model
*/
export default class ConversationModel extends BaseModel {
//TODO: move decryption logic here
}
......@@ -16,6 +16,7 @@ import badge from '../common/services/badge.service';
import { abort, isNetworkFail } from '../common/helpers/abortableFetch';
import i18n from '../common/services/i18n.service';
import logService from '../common/services/log.service';
import ConversationModel from './ConversationModel';
/**
* Messenger Conversation List Store
......@@ -261,6 +262,7 @@ class MessengerListStore {
@action
pushConversations(conversations) {
conversations = ConversationModel.createMany(conversations);
this.conversations = [... this.conversations, ...conversations];
}
......
......@@ -14,6 +14,7 @@ import { observer } from 'mobx-react/native'
import { MINDS_CDN_URI } from '../../config/Config';
import * as Sentry from '@sentry/react-native';
import { FLAG_MESSAGE } from '../../common/Permissions';
/**
* Conversation Component
......@@ -25,7 +26,7 @@ export default class ConversationView extends Component {
* Navigate To conversation
*/
_navToConversation = () => {
if (this.props.navigation) {
if (this.props.navigation && this.props.item.can(FLAG_MESSAGE)) {
this.props.navigation.push('Conversation', { conversation: this.props.item });
}
}
......