Commit 69cd291c authored by tejaswi's avatar tejaswi
Browse files

Count refresh change in chat room

parent a4e9d0e8
Showing with 25 additions and 23 deletions
+25 -23
......@@ -77,7 +77,7 @@ export default class GroupChat extends Component {
this.getMessages();//Getting the List of Messages based pn Task
this.updateMessages();//Update the chat count
// this.groupMembersEmail();//Getting the List of GroupMembers Emails
// alert(this.props.navigation.state.params.sno)
// alert(JSON.stringify(this.props.navigation.state.params.sno))
}
openModal = (item) => {
......
......@@ -221,14 +221,15 @@ class ListItem extends React.Component {
// }
//Navigates to TaskChat Screen
// TaskChat(id, msgCount) {
// console.warn("msgCount" + msgCount);
// console.warn("id" + id);
// // alert(id)
// // alert(JSON.stringify(msgCount))
// log("Info", "UserGroupChat:TaskChat(item, index) used to navigate to taskchat")
// this.props.navigation.navigate("GroupChat", { id: id, sno: msgCount });
// }
TaskChat(id,item, msgCount) {
console.warn("msgCount" + msgCount);
// console.warn("id" + id);
// alert(id)
// alert(item.group_name)
// alert(JSON.stringify(msgCount))
// log("Info", "UserGroupChat:TaskChat(item, index) used to navigate to taskchat")
this.props.navigation.navigate("GroupChat", { id: id, group_name:item.group_name, members_name: item.members_name, members_email: item.members_email, sno: msgCount });
}
render() {
// const { item } = this.props;
const { item, data } = this.props;
......@@ -274,7 +275,8 @@ class ListItem extends React.Component {
const getMessagesCount = (id, msg, empId) => {
//alert("ids"+JSON.stringify(msg))
// alert("ids"+JSON.stringify(id))
// alert(JSON.stringify(msg))
// var msg=this.state.dataSource1;
// console.warn("Datasource and id send by"+JSON.stringify(data1.sendBy))
......@@ -297,16 +299,16 @@ class ListItem extends React.Component {
{
msgCount.length > 0 ?
// <TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => { this.TaskChat(id, msgCount) }}>
<TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => this.props.TaskChat(msgCount)}>
<TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => { this.TaskChat(id, item, msgCount) }}>
{/* <TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => this.props.TaskChat(id,msgCount)}> */}
{/* <TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => { this.TaskChat( msgCount,id,item.group_name,item.members_name,item.members_email) }}> */}
<Image style={{ width: 25, height: 25 }} source={require('../Images/chat.png')} />
</TouchableOpacity>
:
// <TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => { this.TaskChat(id, msgCount) }}>
<TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => this.props.TaskChat(msgCount)}>
<TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => { this.TaskChat(id,item, msgCount) }}>
{/* <TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => this.props.TaskChat(id,msgCount)}> */}
{/* <TouchableOpacity style={{ marginTop: -20, marginLeft: 10 }} onPress={() => { this.TaskChat( msgCount,id,item.group_name,item.members_name,item.members_email) }}> */}
<Image style={{ width: 25, height: 25, }} source={require('../Images/chat.png')} />
......@@ -1500,7 +1502,7 @@ export default class UserGroupChat extends Component {
console.log(item);
console.log(index);
console.log(item.ideaId + item.moduleId);
// console.log(item.ideaId + item.moduleId);
log("Info", "MainTask() method is used to move Add Module to Add MainTask screen");
this.props.navigation.navigate('ManageEpic', { moduleId: item.moduleId, empId: item.empId, idea_id: item.idea_id, moduledesc: item.moduleDesc, idea_title: this.state.idea_title });
......@@ -1515,14 +1517,14 @@ export default class UserGroupChat extends Component {
}
// //Navigate to Project Modify Screen
TaskChat(item, index, msgCount) {
console.log(item);
console.log(index);
// alert("message"+msgCount)
log("Info", "ModifyProject() method is used to move Add Module to Add ModifyChat screen");
this.props.navigation.navigate('GroupChat', { sno: msgCount, id: item.id, group_name: item.group_name, members_name: item.members_name, members_email: item.members_email });
// TaskChat(id,msgCount) {
// // console.log(item);
// // console.log(index);
// alert("message"+msgCount)
// log("Info", "ModifyProject() method is used to move Add Module to Add ModifyChat screen");
// // this.props.navigation.navigate('GroupChat', { sno: msgCount, id: item.id, group_name: item.group_name, members_name: item.members_name, members_email: item.members_email });
}
// }
//list seperator
FlatListItemSeparator = () => {
return (
......@@ -1675,7 +1677,7 @@ export default class UserGroupChat extends Component {
renderItem={({ item, index }) =>
<View style={styles.container} >
<ListItem
<ListItem navigation={this.props.navigation}
item={item}
empId={this.state.empId}
username={this.state.username}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment