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
46ae68be
Commit
46ae68be
authored
3 years ago
by
santhosh
Browse files
Options
Download
Email Patches
Plain Diff
auto focus
parent
40d8601b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/CommonComponents/AdminChatUser.js
+71
-43
src/CommonComponents/AdminChatUser.js
src/CommonComponents/GroupChat.js
+64
-33
src/CommonComponents/GroupChat.js
src/CommonComponents/TaskChat.js
+63
-34
src/CommonComponents/TaskChat.js
src/CommonComponents/UserChat.js
+71
-41
src/CommonComponents/UserChat.js
with
269 additions
and
151 deletions
+269
-151
src/CommonComponents/AdminChatUser.js
View file @
46ae68be
...
@@ -62,9 +62,9 @@ export default class AdminChatUser extends Component {
...
@@ -62,9 +62,9 @@ export default class AdminChatUser extends Component {
groupList
:
''
,
groupList
:
''
,
handleHover
:
false
,
handleHover
:
false
,
commentDetails
:
{},
commentDetails
:
{},
SendImg
:
false
,
SendImg
:
false
,
cls
:
'
1
'
,
cls
:
'
1
'
,
};
};
// alert("Msgcount"+this.props.navigation.state.params.sno)
// alert("Msgcount"+this.props.navigation.state.params.sno)
}
}
...
@@ -336,7 +336,7 @@ export default class AdminChatUser extends Component {
...
@@ -336,7 +336,7 @@ export default class AdminChatUser extends Component {
// });
// });
}
}
openGallery1
(){
openGallery1
()
{
const
images
=
this
.
state
.
images
;
const
images
=
this
.
state
.
images
;
// // alert(JSON.stringify(images))
// // alert(JSON.stringify(images))
// this.setState({
// this.setState({
...
@@ -384,10 +384,10 @@ export default class AdminChatUser extends Component {
...
@@ -384,10 +384,10 @@ export default class AdminChatUser extends Component {
this
.
setState
({
this
.
setState
({
handleHover
:
false
,
handleHover
:
false
,
uri
:
null
,
uri
:
null
,
SendImg
:
false
,
SendImg
:
false
,
message
:
''
,
message
:
''
,
// commentDetails:null
// commentDetails:null
})
})
alert
(
"
Image Uploaded successfully
"
)
alert
(
"
Image Uploaded successfully
"
)
});
});
...
@@ -401,9 +401,9 @@ export default class AdminChatUser extends Component {
...
@@ -401,9 +401,9 @@ export default class AdminChatUser extends Component {
this
.
setState
({
this
.
setState
({
images
:
images
,
images
:
images
,
uri
:
images
.
assets
[
0
].
uri
,
uri
:
images
.
assets
[
0
].
uri
,
SendImg
:
true
SendImg
:
true
})
})
// alert("images" + JSON.stringify(this.state.images))
// alert("images" + JSON.stringify(this.state.images))
}
}
...
@@ -427,9 +427,9 @@ export default class AdminChatUser extends Component {
...
@@ -427,9 +427,9 @@ export default class AdminChatUser extends Component {
this
.
setState
({
this
.
setState
({
handleHover
:
false
,
handleHover
:
false
,
uri
:
null
,
uri
:
null
,
SendImg
:
false
,
SendImg
:
false
,
reply_id
:
''
reply_id
:
''
})
})
}
}
...
@@ -538,7 +538,7 @@ export default class AdminChatUser extends Component {
...
@@ -538,7 +538,7 @@ export default class AdminChatUser extends Component {
<
View
style
=
{{
width
:
'
90%
'
}}
>
<
View
style
=
{{
width
:
'
90%
'
}}
>
<
Image
<
Image
source
=
{{
uri
:
this
.
state
.
uri
}}
source
=
{{
uri
:
this
.
state
.
uri
}}
style
=
{{
width
:
100
,
height
:
100
,
resizeMode
:
'
contain
'
}}
/
>
style
=
{{
width
:
100
,
height
:
100
,
resizeMode
:
'
contain
'
}}
/
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#fff
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#fff
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
...
@@ -547,45 +547,73 @@ export default class AdminChatUser extends Component {
...
@@ -547,45 +547,73 @@ export default class AdminChatUser extends Component {
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
&&
{
this
.
state
.
handleHover
===
true
?
// alert(JSON.stringify(this.state.commentDetails))
// alert(JSON.stringify(this.state.commentDetails))
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
(
this
.
state
.
commentDetails
)}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
(
this
.
state
.
commentDetails
)}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
/View
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
autoFocus
=
{
true
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{
this
.
openGallery
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
openGallery1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
}
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
/View
>
<
/View>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
autoFocus
=
{
true
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{
this
.
openGallery
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
openGallery1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{
this
.
openGallery
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
openGallery1
()}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
}
<
/View
>
<
/View
>
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/GroupChat.js
View file @
46ae68be
...
@@ -684,7 +684,7 @@ export default class GroupChat extends Component {
...
@@ -684,7 +684,7 @@ export default class GroupChat extends Component {
});
});
});
});
}
}
attach1
(){
attach1
()
{
// alert("clicked")
// alert("clicked")
const
images1
=
this
.
state
.
images
;
const
images1
=
this
.
state
.
images
;
...
@@ -876,7 +876,7 @@ export default class GroupChat extends Component {
...
@@ -876,7 +876,7 @@ export default class GroupChat extends Component {
<
View
style
=
{{
width
:
'
90%
'
}}
>
<
View
style
=
{{
width
:
'
90%
'
}}
>
<
Image
<
Image
source
=
{{
uri
:
this
.
state
.
uri
}}
source
=
{{
uri
:
this
.
state
.
uri
}}
style
=
{{
width
:
100
,
height
:
100
,
resizeMode
:
'
contain
'
}}
style
=
{{
width
:
100
,
height
:
100
,
resizeMode
:
'
contain
'
}}
/
>
/
>
<
/View
>
<
/View
>
<
View
>
<
View
>
...
@@ -885,42 +885,73 @@ export default class GroupChat extends Component {
...
@@ -885,42 +885,73 @@ export default class GroupChat extends Component {
<
/View>
}
<
/View>
}
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
&&
{
this
.
state
.
handleHover
===
true
?
// alert(JSON.stringify(this.state.commentDetails))
// alert(JSON.stringify(this.state.commentDetails))
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
/View
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
autoFocus
=
{
true
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
autoFocus
=
{
true
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
}
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
}
<
/View
>
<
/View
>
<
/View
>
...
@@ -930,7 +961,7 @@ export default class GroupChat extends Component {
...
@@ -930,7 +961,7 @@ export default class GroupChat extends Component {
<
/Container
>
<
/Container
>
{
/* </TouchableWithoutFeedback> */
}
{
/* </TouchableWithoutFeedback> */
}
<
/KeyboardAvoidingView
>
<
/KeyboardAvoidingView
>
);
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/TaskChat.js
View file @
46ae68be
...
@@ -677,7 +677,7 @@ export default class TaskChat extends Component {
...
@@ -677,7 +677,7 @@ export default class TaskChat extends Component {
});
});
});
});
}
}
attach1
(){
attach1
()
{
// alert("clicked")
// alert("clicked")
const
images1
=
this
.
state
.
images
;
const
images1
=
this
.
state
.
images
;
...
@@ -735,14 +735,14 @@ export default class TaskChat extends Component {
...
@@ -735,14 +735,14 @@ export default class TaskChat extends Component {
// alert("clicked")
// alert("clicked")
const
images
=
await
launchImageLibrary
(
options
);
const
images
=
await
launchImageLibrary
(
options
);
this
.
setState
({
this
.
setState
({
images
:
images
,
images
:
images
,
uri
:
images
.
assets
[
0
].
uri
,
uri
:
images
.
assets
[
0
].
uri
,
SendImg
:
true
SendImg
:
true
})
})
// alert("images" + JSON.stringify(this.state.images))
// alert("images" + JSON.stringify(this.state.images))
}
}
renderDate
=
(
date
)
=>
{
renderDate
=
(
date
)
=>
{
...
@@ -876,40 +876,69 @@ export default class TaskChat extends Component {
...
@@ -876,40 +876,69 @@ export default class TaskChat extends Component {
<
/View>
}
<
/View>
}
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
&&
{
this
.
state
.
handleHover
===
true
?
// alert(JSON.stringify(this.state.commentDetails))
<
View
>
// alert(JSON.stringify(this.state.commentDetails))
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
autoFocus
=
{
true
}
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
autoFocus
=
{
true
}
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View
>
}
}
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
This diff is collapsed.
Click to expand it.
src/CommonComponents/UserChat.js
View file @
46ae68be
...
@@ -320,8 +320,8 @@ export default class UserChat extends Component {
...
@@ -320,8 +320,8 @@ export default class UserChat extends Component {
SendImg
:
false
,
SendImg
:
false
,
message
:
''
,
message
:
''
,
// commentDetails:null
// commentDetails:null
})
})
alert
(
"
Image Uploaded successfully
"
)
alert
(
"
Image Uploaded successfully
"
)
});
});
});
});
...
@@ -470,42 +470,72 @@ export default class UserChat extends Component {
...
@@ -470,42 +470,72 @@ export default class UserChat extends Component {
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
<
View
style
=
{
this
.
state
.
handleHover
===
true
?
styles
.
footer1
:
styles
.
footer
}
>
{
this
.
state
.
handleHover
&&
{
this
.
state
.
handleHover
===
true
?
// alert(JSON.stringify(this.state.commentDetails))
// alert(JSON.stringify(this.state.commentDetails))
<
View
style
=
{
styles
.
itemBottom
}
>
<
View
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
View
style
=
{
styles
.
itemBottom
}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
View
style
=
{{
width
:
"
90%
"
}}
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
green
'
}}
>
{
this
.
state
.
commentDetails
.
username
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
color
:
'
black
'
}}
>
{
this
.
state
.
commentDetails
.
message
}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
/View
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handlecomClose
()}
><
Icon
color
=
{
'
#000
'
}
size
=
{
25
}
style
=
{{
marginLeft
:
10
,
marginTop
:
5
}}
name
=
"
times-circle-o
"
/><
/TouchableOpacity
>
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
/View
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
autoFocus
=
{
true
}
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
<
/View
>
<
/View>
:
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
autoFocus
=
{
true
}
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
}
<
View
style
=
{{
flexDirection
:
'
row
'
}}
>
<
View
style
=
{
styles
.
inputContainer
}
>
<
TextInput
style
=
{
styles
.
inputs
}
placeholder
=
"
Message
"
underlineColorAndroid
=
'
transparent
'
multiline
=
{
true
}
onChangeText
=
{(
value
)
=>
this
.
setState
({
message
:
value
})}
value
=
{
this
.
state
.
message
}
/
>
<
TouchableOpacity
style
=
{{
top
:
-
5
,
right
:
15
}}
onPress
=
{
this
.
attach
}
>
<
Image
source
=
{
require
(
'
../Images/paperclip.png
'
)}
style
=
{
styles
.
iconSendfile
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
{
this
.
state
.
SendImg
===
false
?
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
sendMessageText
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
style
=
{
styles
.
btnSend
}
disabled
=
{
this
.
state
.
itemPressedDisabled
}
onPress
=
{()
=>
{
this
.
attach1
()
}}
>
<
Image
source
=
{
require
(
'
../Images/sent.png
'
)}
style
=
{
styles
.
iconSend
}
/
>
<
/TouchableOpacity
>
}
}
<
/View
>
<
/View
>
<
/View
>
...
@@ -554,15 +584,15 @@ const styles = StyleSheet.create({
...
@@ -554,15 +584,15 @@ const styles = StyleSheet.create({
justifyContent
:
'
center
'
,
justifyContent
:
'
center
'
,
},
},
btnSendImg
:
{
btnSendImg
:
{
backgroundColor
:
"
green
"
,
backgroundColor
:
"
green
"
,
width
:
40
,
width
:
40
,
margin
:
6
,
margin
:
6
,
height
:
40
,
height
:
40
,
borderRadius
:
360
,
borderRadius
:
360
,
alignItems
:
'
center
'
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
justifyContent
:
'
center
'
,
},
},
iconSend
:
{
iconSend
:
{
width
:
25
,
width
:
25
,
...
...
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