From 64b8e12ff680460da585f714e39bf2a9968e73c1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 2 Jul 2021 14:27:16 +0300 Subject: [PATCH] [Mobile] Fix user name in comments --- .../lib/view/collaboration/Comments.jsx | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index d403f8cbb6..23be9fae5b 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -56,7 +56,7 @@ const AddCommentPopup = inject("storeComments")(observer(props => { {Device.android &&
{userInfo.initials}
} -
{userInfo.name}
+
{GetUserName(userInfo.name)}
{setText(event.target.value);}}> @@ -91,7 +91,7 @@ const AddCommentDialog = inject("storeComments")(observer(props => {
${Device.android ? templateInitials : ''} -
${userInfo.name}
+
${GetUserName(userInfo.name)}
@@ -223,7 +223,7 @@ const EditCommentPopup = inject("storeComments")(observer(({storeComments, comme
{comment.userInitials}
}
-
{comment.userName}
+
{GetUserName(comment.userName)}
{comment.date}
@@ -260,7 +260,7 @@ const EditCommentDialog = inject("storeComments")(observer(({storeComments, comm
${Device.android ? templateInitials : ''}
-
${comment.userName}
+
${GetUserName(comment.userName)}
${comment.date}
@@ -352,7 +352,7 @@ const AddReplyPopup = inject("storeComments")(observer(({storeComments, userInfo {Device.android &&
{userInfo.initials}
} -
{userInfo.name}
+
{GetUserName(userInfo.name)}
{setText(event.target.value);}}> @@ -386,7 +386,7 @@ const AddReplyDialog = inject("storeComments")(observer(({storeComments, userInf
${Device.android ? templateInitials : ''} -
${userInfo.name}
+
${GetUserName(userInfo.name)}
@@ -479,7 +479,7 @@ const EditReplyPopup = inject("storeComments")(observer(({storeComments, comment
{reply.userInitials}
}
-
{reply.userName}
+
{GetUserName(reply.userName)}
{reply.date}
@@ -516,7 +516,7 @@ const EditReplyDialog = inject("storeComments")(observer(({storeComments, commen
${Device.android ? templateInitials : ''}
-
${reply.userName}
+
${GetUserName(reply.userName)}
${reply.date}
@@ -663,7 +663,7 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
{isAndroid &&
{comment.userInitials}
}
-
{comment.userName}
+
{GetUserName(comment.userName)}
{comment.date}
@@ -693,7 +693,7 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
{isAndroid &&
{reply.userInitials}
}
-
{reply.userName}
+
{GetUserName(reply.userName)}
{reply.date}
@@ -792,7 +792,7 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
{isAndroid &&
{comment.userInitials}
}
-
{comment.userName}
+
{GetUserName(comment.userName)}
{comment.date}
@@ -822,7 +822,7 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
{isAndroid &&
{reply.userInitials}
}
-
{reply.userName}
+
{GetUserName(reply.userName)}
{reply.date}
@@ -929,6 +929,12 @@ const ViewCurrentComments = props => { ) }; +const GetUserName = name => { + return ( + Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(name)) + ) +}; + export { AddComment, EditComment,