[PE mobile] Bug 47978
This commit is contained in:
parent
36f75e01ed
commit
27dc6495a4
|
@ -558,10 +558,20 @@ class ViewCommentsController extends Component {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
showComment (comment) {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
api.asc_selectComment(comment.uid);
|
||||
api.asc_showComment(comment.uid, false);
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
return(
|
||||
<Fragment>
|
||||
{this.props.allComments && <ViewComments onCommentMenuClick={this.onCommentMenuClick} onResolveComment={this.onResolveComment} />}
|
||||
{this.props.allComments && <ViewComments onCommentMenuClick={this.onCommentMenuClick} onResolveComment={this.onResolveComment}
|
||||
showComment={this.showComment} />}
|
||||
{this.state.isOpenViewCurComments && <ViewCurrentComments opened={this.state.isOpenViewCurComments}
|
||||
closeCurComments={this.closeViewCurComments}
|
||||
onCommentMenuClick={this.onCommentMenuClick}
|
||||
|
|
|
@ -626,7 +626,7 @@ const pickLink = (message) => {
|
|||
}
|
||||
|
||||
// View comments
|
||||
const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment}) => {
|
||||
const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, showComment}) => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('Common.Collaboration', {returnObjects: true});
|
||||
const isAndroid = Device.android;
|
||||
|
@ -657,7 +657,8 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
|
|||
<List className='comment-list'>
|
||||
{sortComments.map((comment, indexComment) => {
|
||||
return (
|
||||
<ListItem key={`comment-${indexComment}`}>
|
||||
<ListItem key={`comment-${indexComment}`} onClick={e => {
|
||||
!e.target.closest('.comment-menu') && !e.target.closest('.reply-menu') ? showComment(comment) : null}}>
|
||||
<div slot='header' className='comment-header'>
|
||||
<div className='left'>
|
||||
{isAndroid && <div className='initials' style={{backgroundColor: `${comment.userColor ? comment.userColor : '#cfcfcf'}`}}>{comment.userInitials}</div>}
|
||||
|
|
Loading…
Reference in a new issue