Skip to content

Commit

Permalink
fix: translation and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Jan 13, 2025
1 parent 5921e7c commit ca703c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4656,7 +4656,7 @@ const translations = {
};
},
upgradedWorkspace: 'mejoró este espacio de trabajo al plan Controlar',
downgradedWorkspace: 'bajó este espacio de trabajo al plan Recopilar',
downgradedWorkspace: 'bajó de categoría este espacio de trabajo al plan Recopilar',
},
roomMembersPage: {
memberNotFound: 'Miembro no encontrado.',
Expand Down
7 changes: 4 additions & 3 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,8 @@ function readNewestAction(reportID: string | undefined, shouldResetUnreadMarker
/**
* Sets the last read time on a report
*/
function markCommentAsUnread(reportID?: string, reportActionCreated?: string) {
if (reportID === '-1' || !reportID) {
function markCommentAsUnread(reportID: string | undefined, reportActionCreated: string | undefined) {
if (!reportID) {
Log.warn('7339cd6c-3263-4f89-98e5-730f0be15784 Invalid report passed to MarkCommentAsUnread. Not calling the API because it wil fail.');
return;
}
Expand All @@ -1386,7 +1386,8 @@ function markCommentAsUnread(reportID?: string, reportActionCreated?: string) {

// If no action created date is provided, use the last action's from other user
const actionCreationTime =
reportActionCreated ?? latestReportActionFromOtherUsers?.created ?? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]?.lastVisibleActionCreated ?? DateUtils.getDBTime(0);
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
reportActionCreated || latestReportActionFromOtherUsers?.created ?? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]?.lastVisibleActionCreated ?? DateUtils.getDBTime(0);

Check failure on line 1390 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Parsing error: Nullish coalescing operator(??) requires parens when mixing with logical operators

Check failure on line 1390 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / typecheck

'||' and '??' operations cannot be mixed without parentheses.

Check failure on line 1390 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Parsing error: Nullish coalescing operator(??) requires parens when mixing with logical operators

// We subtract 1 millisecond so that the lastReadTime is updated to just before a given reportAction's created date
// For example, if we want to mark a report action with ID 100 and created date '2014-04-01 16:07:02.999' unread, we set the lastReadTime to '2014-04-01 16:07:02.998'
Expand Down

0 comments on commit ca703c0

Please sign in to comment.