From 2d354f95fae285ee9789be2603d85e6a82a16b1b Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 13 Apr 2023 09:17:26 -0400 Subject: [PATCH] Add note on comment when edited --- app/scenes/Document/components/CommentThreadItem.tsx | 11 +++++++++++ shared/i18n/locales/en_US/translation.json | 1 + 2 files changed, 12 insertions(+) diff --git a/app/scenes/Document/components/CommentThreadItem.tsx b/app/scenes/Document/components/CommentThreadItem.tsx index b86a52eb2..20c76eae5 100644 --- a/app/scenes/Document/components/CommentThreadItem.tsx +++ b/app/scenes/Document/components/CommentThreadItem.tsx @@ -89,6 +89,7 @@ function CommentThreadItem({ const [data, setData] = React.useState(toJS(comment.data)); const showAuthor = firstOfAuthor; const showTime = useShowTime(comment.createdAt, previousCommentCreatedAt); + const showEdited = comment.updatedAt !== comment.createdAt; const [isEditing, setEditing, setReadOnly] = useBoolean(); const formRef = React.useRef(null); @@ -158,6 +159,16 @@ function CommentThreadItem({ shorten /> )} + {showEdited && ( + <> + {" "} + ( + + ) + + )} )} diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index b5e6b8be4..ba4768c6f 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -443,6 +443,7 @@ "Cancel": "Cancel", "No comments yet": "No comments yet", "Error updating comment": "Error updating comment", + "edited": "edited", "Images are still uploading.\nAre you sure you want to discard them?": "Images are still uploading.\nAre you sure you want to discard them?", "Viewed by": "Viewed by", "only you": "only you",