Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RocketChat
Rocket.Chat.ReactNative
Commits
a580d3a8
Unverified
Commit
a580d3a8
authored
Feb 17, 2020
by
Diego Mello
Committed by
GitHub
Feb 17, 2020
Browse files
[FIX] Add missing calls to user info (#1741)
parent
a200e970
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/containers/message/MessageAvatar.js
View file @
a580d3a8
...
@@ -8,7 +8,7 @@ import styles from './styles';
...
@@ -8,7 +8,7 @@ import styles from './styles';
const
MessageAvatar
=
React
.
memo
(({
const
MessageAvatar
=
React
.
memo
(({
isHeader
,
avatar
,
author
,
baseUrl
,
user
,
small
,
navToRoomInfo
isHeader
,
avatar
,
author
,
baseUrl
,
user
,
small
,
navToRoomInfo
})
=>
{
})
=>
{
if
(
isHeader
)
{
if
(
isHeader
&&
author
)
{
const
navParam
=
{
const
navParam
=
{
t
:
'
d
'
,
t
:
'
d
'
,
rid
:
author
.
_id
rid
:
author
.
_id
...
...
app/containers/message/index.js
View file @
a580d3a8
...
@@ -50,7 +50,20 @@ class MessageContainer extends React.Component {
...
@@ -50,7 +50,20 @@ class MessageContainer extends React.Component {
}
}
static
defaultProps
=
{
static
defaultProps
=
{
getCustomEmoji
:
()
=>
{},
onLongPress
:
()
=>
{},
onLongPress
:
()
=>
{},
onReactionPress
:
()
=>
{},
onDiscussionPress
:
()
=>
{},
onThreadPress
:
()
=>
{},
errorActionsShow
:
()
=>
{},
replyBroadcast
:
()
=>
{},
reactionInit
:
()
=>
{},
fetchThreadName
:
()
=>
{},
showAttachment
:
()
=>
{},
onReactionLongPress
:
()
=>
{},
navToRoomInfo
:
()
=>
{},
callJitsi
:
()
=>
{},
blockAction
:
()
=>
{},
archived
:
false
,
archived
:
false
,
broadcast
:
false
,
broadcast
:
false
,
theme
:
'
light
'
theme
:
'
light
'
...
...
app/views/MessagesView/index.js
View file @
a580d3a8
...
@@ -74,6 +74,14 @@ class MessagesView extends React.Component {
...
@@ -74,6 +74,14 @@ class MessagesView extends React.Component {
return
false
;
return
false
;
}
}
navToRoomInfo
=
(
navParam
)
=>
{
const
{
navigation
,
user
}
=
this
.
props
;
if
(
navParam
.
rid
===
user
.
id
)
{
return
;
}
navigation
.
navigate
(
'
RoomInfoView
'
,
navParam
);
}
defineMessagesViewContent
=
(
name
)
=>
{
defineMessagesViewContent
=
(
name
)
=>
{
const
{
messages
}
=
this
.
state
;
const
{
messages
}
=
this
.
state
;
const
{
user
,
baseUrl
,
theme
}
=
this
.
props
;
const
{
user
,
baseUrl
,
theme
}
=
this
.
props
;
...
@@ -88,7 +96,8 @@ class MessagesView extends React.Component {
...
@@ -88,7 +96,8 @@ class MessagesView extends React.Component {
isHeader
:
true
,
isHeader
:
true
,
attachments
:
item
.
attachments
||
[],
attachments
:
item
.
attachments
||
[],
showAttachment
:
this
.
showAttachment
,
showAttachment
:
this
.
showAttachment
,
getCustomEmoji
:
this
.
getCustomEmoji
getCustomEmoji
:
this
.
getCustomEmoji
,
navToRoomInfo
:
this
.
navToRoomInfo
});
});
return
({
return
({
...
...
app/views/SearchMessagesView/index.js
View file @
a580d3a8
...
@@ -94,6 +94,14 @@ class SearchMessagesView extends React.Component {
...
@@ -94,6 +94,14 @@ class SearchMessagesView extends React.Component {
return
null
;
return
null
;
}
}
navToRoomInfo
=
(
navParam
)
=>
{
const
{
navigation
,
user
}
=
this
.
props
;
if
(
navParam
.
rid
===
user
.
id
)
{
return
;
}
navigation
.
navigate
(
'
RoomInfoView
'
,
navParam
);
}
renderEmpty
=
()
=>
{
renderEmpty
=
()
=>
{
const
{
theme
}
=
this
.
props
;
const
{
theme
}
=
this
.
props
;
return
(
return
(
...
@@ -118,6 +126,7 @@ class SearchMessagesView extends React.Component {
...
@@ -118,6 +126,7 @@ class SearchMessagesView extends React.Component {
isHeader
isHeader
showAttachment
=
{()
=>
{}}
showAttachment
=
{()
=>
{}}
getCustomEmoji
=
{
this
.
getCustomEmoji
}
getCustomEmoji
=
{
this
.
getCustomEmoji
}
navToRoomInfo
=
{
this
.
navToRoomInfo
}
theme
=
{
theme
}
theme
=
{
theme
}
/
>
/
>
);
);
...
...
Write
Preview
Supports
Markdown
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