mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core: support mention notification
This commit is contained in:
1 parent
d66c161e66
commit
ca00dda575
14 files changed
+67
-24
No files matched your search
@@ -3,6 +3,7 @@ import _ from 'lodash';
|
||||
import { connect } from 'react-redux';
|
||||
import 'jquery-scroll-lock';
|
||||
|
||||
import i18n from 'vj/utils/i18n';
|
||||
import ListItem from './DialogueListItemComponent';
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
@@ -38,7 +39,12 @@ export default connect(mapStateToProps, mapDispatchToProps)(class MessagePadDial
|
||||
<ListItem
|
||||
key={dialogue._id}
|
||||
userName={dialogue.udoc.uname}
|
||||
summary={(_.last(dialogue.messages)?.content) || ''}
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
summary={_.last(dialogue.messages)
|
||||
? (_.last(dialogue.messages).flag & 4)
|
||||
? i18n('[Richtext message]')
|
||||
: _.last(dialogue.messages).content
|
||||
: ''}
|
||||
faceUrl={dialogue.udoc.avatarUrl}
|
||||
active={dialogue._id === this.props.activeId}
|
||||
onClick={() => this.props.handleClick(dialogue._id)}
|
||||
|
||||
Reference in new issue
Block a user