Skip to content

Commit

Permalink
Merge pull request #48575 from bernhardoj/fix/48364-list-title-isn't-…
Browse files Browse the repository at this point in the history
…bold

Bold list item title by default
  • Loading branch information
carlosmiceli authored Sep 5, 2024
2 parents b000dcd + 9c83581 commit 8daa5b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ type GetOptionsConfig = {
includeInvoiceRooms?: boolean;
includeDomainEmail?: boolean;
action?: IOUAction;
shouldBoldTitleByDefault?: boolean;
};

type GetUserToInviteConfig = {
Expand Down Expand Up @@ -1743,6 +1744,7 @@ function getOptions(
includeInvoiceRooms = false,
includeDomainEmail = false,
action,
shouldBoldTitleByDefault = true,
}: GetOptionsConfig,
): Options {
if (includeCategories) {
Expand Down Expand Up @@ -1967,7 +1969,7 @@ function getOptions(
}

reportOption.isSelected = isReportSelected(reportOption, selectedOptions);
reportOption.isBold = shouldUseBoldText(reportOption);
reportOption.isBold = shouldBoldTitleByDefault || shouldUseBoldText(reportOption);

if (action === CONST.IOU.ACTION.CATEGORIZE) {
const policyCategories = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${reportOption.policyID}`] ?? {};
Expand All @@ -1991,7 +1993,7 @@ function getOptions(
if (personalDetailsOptionsToExclude.some((optionToExclude) => optionToExclude.login === personalDetailOption.login)) {
continue;
}
personalDetailOption.isBold = shouldUseBoldText(personalDetailOption);
personalDetailOption.isBold = shouldBoldTitleByDefault;

personalDetailsOptions.push(personalDetailOption);
}
Expand Down Expand Up @@ -2061,6 +2063,7 @@ function getSearchOptions(options: OptionList, searchValue = '', betas: Beta[] =
includeMoneyRequests: true,
includeTasks: true,
includeSelfDM: true,
shouldBoldTitleByDefault: false,
});
Timing.end(CONST.TIMING.LOAD_SEARCH_OPTIONS);
Performance.markEnd(CONST.TIMING.LOAD_SEARCH_OPTIONS);
Expand Down

0 comments on commit 8daa5b1

Please sign in to comment.