diff --git a/apps/common/mobile/lib/controller/collaboration/Comments.jsx b/apps/common/mobile/lib/controller/collaboration/Comments.jsx index 0ac2326ca8..8faa8277cb 100644 --- a/apps/common/mobile/lib/controller/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Comments.jsx @@ -5,7 +5,7 @@ import {Device} from '../../../../../common/mobile/utils/device'; import { withTranslation} from 'react-i18next'; import { LocalStorage } from '../../../utils/LocalStorage'; -import {AddComment, EditComment, AddReply, EditReply, ViewComments, ViewCurrentComments, ViewAllComments} from '../../view/collaboration/Comments'; +import {AddComment, EditComment, AddReply, EditReply, ViewComments, ViewCurrentComments} from '../../view/collaboration/Comments'; // utils const timeZoneOffsetInMs = (new Date()).getTimezoneOffset() * 60000; @@ -613,9 +613,9 @@ class ViewCommentsController extends Component { render() { return( - {this.props.allComments && } - {this.state.isOpenViewCurComments && - {this.props.allComments && } - {this.state.isOpenViewCurComments && } - - ) - } } const _CommentsController = inject('storeAppOptions', 'storeComments', 'users', "storeApplicationSettings")(observer(CommentsController)); diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index d67abd55e8..94f0891d19 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -674,8 +674,8 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o {!viewMode &&
- {(comment.editable && displayMode === 'markup') &&
{onResolveComment(comment);}}>
} - {displayMode === 'markup' && + {(comment.editable && displayMode === 'markup' && !wsProps?.Objects) &&
{onResolveComment(comment);}}>
} + {(displayMode === 'markup' && !wsProps?.Objects) &&
{setComment(comment); openActionComment(true);}}> @@ -741,8 +741,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o // const _ViewComments = inject('storeComments', 'storeAppOptions', "storeReview")(observer(ViewComments)); - -const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(observer(({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, storeReview}) => { +const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(observer(({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, storeReview, wsProps}) => { const { t } = useTranslation(); const _t = t('Common.Collaboration', {returnObjects: true}); const isAndroid = Device.android; @@ -785,8 +784,8 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob return ( - {!viewMode && - {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply} + {!viewMode && + {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply} }
@@ -807,8 +806,8 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
{!viewMode &&
- {(comment.editable && displayMode === 'markup') &&
{onResolveComment(comment);}}>
} - {displayMode === 'markup' && + {(comment.editable && displayMode === 'markup' && !wsProps?.Objects) &&
{onResolveComment(comment);}}>
} + {(displayMode === 'markup' && !wsProps?.Objects) &&
{openActionComment(true);}}> @@ -871,7 +870,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob })); -const ViewCommentSheet = ({closeCurComments, onCommentMenuClick, onResolveComment}) => { +const ViewCommentSheet = ({closeCurComments, onCommentMenuClick, onResolveComment, wsProps}) => { useEffect(() => { f7.sheet.open('#view-comment-sheet'); }); @@ -917,47 +916,23 @@ const ViewCommentSheet = ({closeCurComments, onCommentMenuClick, onResolveCommen
- + ) }; -const ViewCommentPopover = ({onCommentMenuClick, onResolveComment}) => { +const ViewCommentPopover = ({onCommentMenuClick, onResolveComment, wsProps}) => { useEffect(() => { f7.popover.open('#view-comment-popover', '#btn-coauth'); }); return ( - + ) }; -const ViewCommentsPopover = ({wsProps, onCommentMenuClick, onResolveComment, showComment}) => { - useEffect(() => { - f7.popover.open('#view-comments-popover', '#btn-coauth'); - }); - - return ( - - - - ) -} - -const ViewCommentsSheet = ({wsProps, onCommentMenuClick, onResolveComment, showComment}) => { - useEffect(() => { - f7.sheet.open('#view-comments-sheet'); - }); - - return ( - - - - ) -} - const ViewCurrentComments = props => { return ( Device.phone ? @@ -966,14 +941,6 @@ const ViewCurrentComments = props => { ) }; -const ViewAllComments = props => { - return ( - Device.phone ? - : - - ) -} - export { AddComment, EditComment, @@ -981,6 +948,5 @@ export { EditReply, ViewComments, // _ViewComments as ViewComments, - ViewCurrentComments, - ViewAllComments + ViewCurrentComments };