Skip to content

Commit

Permalink
Merge pull request #3979 from dklymenk/3743-3293-add-LHN-label-for-de…
Browse files Browse the repository at this point in the history
…leted-messages
  • Loading branch information
iwiznia authored Jul 12, 2021
2 parents 57f557c + 13ee9bc commit f61e6d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default {
send: 'Send',
notifications: 'Notifications',
noResultsFound: 'No results found',
deletedCommentMessage: 'Comment deleted',
},
attachmentPicker: {
cameraPermissionRequired: 'Camera Permission Required',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default {
send: 'Enviar',
notifications: 'Notificaciones',
noResultsFound: 'No se han encontrado resultados',
deletedCommentMessage: 'Comentario borrado',
},
attachmentPicker: {
cameraPermissionRequired: 'Se necesita permiso para usar la cámara',
Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function getSimplifiedReportObject(report) {
// We convert the line-breaks in html to space ' ' before striping the tags
const lastMessageText = lodashGet(lastReportAction, ['message', 'html'], '')
.replace(/((<br[^>]*>)+)/gi, ' ')
.replace(/(<([^>]+)>)/gi, '');
.replace(/(<([^>]+)>)/gi, '') || `[${translateLocal('common.deletedCommentMessage')}]`;
const reportName = lodashGet(report, ['reportNameValuePairs', 'type']) === 'chat'
? getChatReportName(report, chatType)
: report.reportName;
Expand Down Expand Up @@ -504,7 +504,7 @@ function updateReportActionMessage(reportID, sequenceNumber, message) {
// If this is the most recent message, update the lastMessageText in the report object as well
if (sequenceNumber === reportMaxSequenceNumbers[reportID]) {
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {
lastMessageText: message.html,
lastMessageText: message.html || `[${translateLocal('common.deletedCommentMessage')}]`,
});
}
}
Expand Down

0 comments on commit f61e6d9

Please sign in to comment.