Skip to content

Commit

Permalink
add participant to optionItem
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Oct 22, 2024
1 parent 63318c1 commit 81a0f94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2612,7 +2612,7 @@ function getEmptyOptions(): Options {
}

function shouldUseBoldText(report: ReportUtils.OptionData): boolean {
const notificationPreference = ReportUtils.getReportNotificationPreference(report, false);
const notificationPreference = ReportUtils.getReportNotificationPreference(report);
return report.isUnread === true && notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE && notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ function getDefaultNotificationPreferenceForReport(report: OnyxEntry<Report>): V
/**
* Get the notification preference given a report
*/
function getReportNotificationPreference(report: OnyxEntry<Report>, shouldDefaltToHidden = true): ValueOf<typeof CONST.REPORT.NOTIFICATION_PREFERENCE> {
function getReportNotificationPreference(report: OnyxEntry<Report>, shouldDefaltToHidden = true, log = ''): ValueOf<typeof CONST.REPORT.NOTIFICATION_PREFERENCE> {

Check failure on line 1227 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'log' is assigned a value but never used
if (!shouldDefaltToHidden) {
return report?.participants?.[currentUserAccountID ?? -1]?.notificationPreference ?? getDefaultNotificationPreferenceForReport(report);
}
Expand Down
1 change: 1 addition & 0 deletions src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ function getOptionData({
result.hasOutstandingChildTask = report.hasOutstandingChildTask;
result.hasParentAccess = report.hasParentAccess;
result.isConciergeChat = ReportUtils.isConciergeChatReport(report);
result.participants = report.participants;

const hasMultipleParticipants = participantPersonalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat || ReportUtils.isExpenseReport(report);
const subtitle = ReportUtils.getChatRoomSubtitle(report);
Expand Down

0 comments on commit 81a0f94

Please sign in to comment.