Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Santhosh
Agile24X7-Mobile-singledb
Commits
14018193
Commit
14018193
authored
3 years ago
by
santhosh
Browse files
Options
Download
Email Patches
Plain Diff
chat last message
parent
1f3cdb63
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
src/CommonComponents/AdminChatUser.js
+9
-7
src/CommonComponents/AdminChatUser.js
src/CommonComponents/GroupChat.js
+9
-7
src/CommonComponents/GroupChat.js
src/CommonComponents/TaskChat.js
+7
-5
src/CommonComponents/TaskChat.js
src/CommonComponents/UserChat.js
+6
-4
src/CommonComponents/UserChat.js
src/WebServices/RestClient.js
+1
-1
src/WebServices/RestClient.js
with
32 additions
and
24 deletions
+32
-24
src/CommonComponents/AdminChatUser.js
View file @
14018193
...
...
@@ -54,7 +54,7 @@ export default class AdminChatUser extends Component {
action
:
this
.
props
.
navigation
.
state
.
params
.
action
,
empId
:
this
.
props
.
navigation
.
state
.
params
.
empId
,
device_id
:
this
.
props
.
navigation
.
state
.
params
.
device_id
,
player_id
:
this
.
props
.
navigation
.
state
.
params
.
player_id
,
player_id
:
this
.
props
.
navigation
.
state
.
params
.
player_id
,
name
:
this
.
props
.
navigation
.
state
.
params
.
name
,
sno
:
this
.
props
.
navigation
.
state
.
params
.
sno
,
...
...
@@ -118,7 +118,7 @@ export default class AdminChatUser extends Component {
if
(
responseJson
.
status
===
'
True
'
)
{
console
.
warn
(
responseJson
);
this
.
setState
({
dataSource
:
responseJson
.
data
,
dataSource
:
responseJson
.
data
.
reverse
()
,
});
}
else
{
this
.
setState
({
...
...
@@ -180,7 +180,7 @@ export default class AdminChatUser extends Component {
receivedBy
:
this
.
props
.
navigation
.
state
.
params
.
empId
,
projectId
:
projectId
,
device_id
:
device_id
,
player_id
:
player_id
,
player_id
:
player_id
,
})
})
...
...
@@ -314,7 +314,7 @@ export default class AdminChatUser extends Component {
messagedBy
:
userToken
,
projectId
:
projectId
,
device_id
:
this
.
state
.
device_id
,
player_id
:
""
,
player_id
:
""
,
reply_id
:
this
.
state
.
commentDetails
.
id
?
this
.
state
.
commentDetails
.
id
:
""
})
...
...
@@ -478,13 +478,15 @@ export default class AdminChatUser extends Component {
{
/* <KeyboardAvoidingView> */
}
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
ref
=
{
ref
=>
{
this
.
scrollView
=
ref
}}
onContentSizeChange
=
{()
=>
this
.
scrollView
.
scrollToEnd
({
y
:
0
,
animated
:
false
})}
horizontal
=
{
true
}
showsHorizontalScrollIndicator
=
{
true
}
// ref={ref => { this.scrollView = ref }}
// onContentSizeChange={() => this.scrollView.scrollToEnd({ y: 0, animated: false })}
>
<
FlatList
style
=
{
styles
.
list
}
inverted
data
=
{
this
.
state
.
dataSource
}
keyExtractor
=
{(
item
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/GroupChat.js
View file @
14018193
...
...
@@ -540,7 +540,7 @@ export default class GroupChat extends Component {
if
(
responseJson
.
status
===
'
True
'
)
{
console
.
warn
(
responseJson
);
this
.
setState
({
dataSource
:
responseJson
.
data
,
dataSource
:
responseJson
.
data
.
reverse
()
,
});
}
else
{
this
.
setState
({
...
...
@@ -808,13 +808,15 @@ export default class GroupChat extends Component {
{
/* <KeyboardAvoidingView> */
}
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
ref
=
{
ref
=>
{
this
.
scrollView
=
ref
}}
onContentSizeChange
=
{()
=>
this
.
scrollView
.
scrollToEnd
({
y
:
0
,
animated
:
false
})}
horizontal
=
{
true
}
showsHorizontalScrollIndicator
=
{
false
}
// ref={ref => { this.scrollView = ref }}
// onContentSizeChange={() => this.scrollView.scrollToEnd({ y: 0, animated: false })}
>
<
FlatList
style
=
{
styles
.
list
}
inverted
data
=
{
this
.
state
.
dataSource
}
keyExtractor
=
{(
item
)
=>
{
...
...
@@ -838,7 +840,7 @@ export default class GroupChat extends Component {
<
View
style
=
{{
padding
:
5
,
}}
>
{
itemStyle
===
styles
.
itemOut
?
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
orange
'
}}
>
{
item
.
reply_username
}
<
/Text></
View
>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
blue
'
}}
>
{
item
.
username
}
<
/Text></
View
>
}
{
item
.
reply_path
!==
""
?
<
Image
source
=
{{
uri
:
item
.
reply_path
}}
style
=
{{
width
:
210
,
height
:
50
}}
/> : null
}
<
Text
style
=
{{
width
:
210
}}
selectable
=
{
true
}
key
=
{
Math
.
random
()}
>
{
item
.
reply_message
}
<
/Text
>
<
Text
style
=
{{
width
:
210
}}
selectable
=
{
true
}
key
=
{
Math
.
random
()}
>
{
item
.
reply_message
}
<
/Text
>
{
!
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
{
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
<
/View
>
...
...
@@ -848,7 +850,7 @@ export default class GroupChat extends Component {
<
View
style
=
{{
padding
:
5
,
}}
>
{
itemStyle
===
styles
.
itemOut
?
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
orange
'
}}
>
{
item
.
username
}
<
/Text><TouchableOpacity onPress={
()
=> this.handlecom
(
item
)
} ><Icon color={'#C0C0C0'} size=
{25}
style={{ marginLeft: 10 }} name="reply" /
><
/TouchableOpacity></
View
>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
blue
'
}}
>
{
item
.
username
}
<
/Text><TouchableOpacity onPress={
()
=> this.handlecom
(
item
)
} ><Icon color={'#C0C0C0'} size=
{25}
style={{ marginLeft: 10 }} name="reply" /
><
/TouchableOpacity></
View
>
}
{
item
.
path
!==
""
?
<
Image
source
=
{{
uri
:
item
.
path
}}
style
=
{
styles
.
imageview
}
/> : null
}
<
Text
style
=
{{
width
:
210
}}
selectable
=
{
true
}
key
=
{
Math
.
random
()}
>
{
item
.
message
}
<
/Text
>
<
Text
style
=
{{
width
:
210
}}
selectable
=
{
true
}
key
=
{
Math
.
random
()}
>
{
item
.
message
}
<
/Text
>
{
!
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
{
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
<
/View
>
...
...
@@ -860,7 +862,7 @@ export default class GroupChat extends Component {
<
View
style
=
{{
padding
:
5
,
}}
>
{
itemStyle
===
styles
.
itemOut
?
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
orange
'
}}
>
{
item
.
username
}
<
/Text><TouchableOpacity onPress={
()
=> this.handlecom
(
item
)
} ><Icon color={'#C0C0C0'} size=
{25}
style={{ marginLeft: 10 }} name="reply" /
><
/TouchableOpacity></
View
>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
><
Text
style
=
{{
fontSize
:
12
,
color
:
'
blue
'
}}
>
{
item
.
username
}
<
/Text><TouchableOpacity onPress={
()
=> this.handlecom
(
item
)
} ><Icon color={'#C0C0C0'} size=
{25}
style={{ marginLeft: 10 }} name="reply" /
><
/TouchableOpacity></
View
>
}
{
item
.
path
!==
""
?
<
Image
source
=
{{
uri
:
item
.
path
}}
style
=
{
styles
.
imageview
}
/> : null
}
<
Text
selectable
=
{
true
}
key
=
{
Math
.
random
()}
>
{
item
.
message
}
<
/Text
>
<
Text
style
=
{{
width
:
210
}}
selectable
=
{
true
}
key
=
{
Math
.
random
()}
>
{
item
.
message
}
<
/Text
>
{
!
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
{
inMessage
&&
this
.
renderDate
(
moment
(
item
.
messagedTime
).
format
(
'
MM.DD.YYYY hh:mm:ss
'
))}
<
/View
>
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/TaskChat.js
View file @
14018193
...
...
@@ -534,7 +534,7 @@ export default class TaskChat extends Component {
if
(
responseJson
.
status
===
'
True
'
)
{
// alert("messages" + JSON.stringify(responseJson));
this
.
setState
({
dataSource
:
responseJson
.
data
,
dataSource
:
responseJson
.
data
.
reverse
()
,
});
}
else
{
this
.
setState
({
...
...
@@ -803,12 +803,14 @@ export default class TaskChat extends Component {
{
/* <KeyboardAvoidingView> */
}
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
ref
=
{
ref
=>
{
this
.
scrollView
=
ref
}}
onContentSizeChange
=
{()
=>
this
.
scrollView
.
scrollToEnd
({
y
:
0
,
animated
:
false
})}
horizontal
=
{
true
}
showsHorizontalScrollIndicator
=
{
false
}
// ref={ref => { this.scrollView = ref }}
// onContentSizeChange={() => this.scrollView.scrollToEnd({ y: 0, animated: false })}
>
<
FlatList
style
=
{
styles
.
list
}
inverted
data
=
{
this
.
state
.
dataSource
}
keyExtractor
=
{(
item
)
=>
{
...
...
@@ -878,7 +880,7 @@ export default class TaskChat extends Component {
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
===
true
?
<
View
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/UserChat.js
View file @
14018193
...
...
@@ -131,7 +131,7 @@ export default class UserChat extends Component {
if
(
responseJson
.
status
===
'
True
'
)
{
console
.
warn
(
responseJson
);
this
.
setState
({
dataSource
:
responseJson
.
data
,
dataSource
:
responseJson
.
data
.
reverse
()
,
});
}
else
{
this
.
setState
({
...
...
@@ -397,13 +397,15 @@ export default class UserChat extends Component {
{
/* <KeyboardAvoidingView> */
}
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
ref
=
{
ref
=>
{
this
.
scrollView
=
ref
}}
onContentSizeChange
=
{()
=>
this
.
scrollView
.
scrollToEnd
({
y
:
0
,
animated
:
false
})}
horizontal
=
{
true
}
showsHorizontalScrollIndicator
=
{
false
}
// ref={ref => { this.scrollView = ref }}
// onContentSizeChange={() => this.scrollView.scrollToEnd({ y: 0, animated: false })}
>
<
FlatList
style
=
{
styles
.
list
}
inverted
data
=
{
this
.
state
.
dataSource
}
keyExtractor
=
{(
item
)
=>
{
return
item
.
id
;
...
...
This diff is collapsed.
Click to expand it.
src/WebServices/RestClient.js
View file @
14018193
...
...
@@ -16,7 +16,7 @@
/*****Postgress********/
//
//pre production environment (development)
//pre production environment (development)
export
const
API
=
"
https://api-single.agile24x7.com/pg_migration/
"
;
export
const
CHATAPI
=
"
https://api-single.agile24x7.com/pg_migration
"
;
export
const
ReportsAPI
=
"
https://pgtestreporting.agile24x7.com/
"
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment