Skip to content

Commit

Permalink
remove list's tooltips limit.
Browse files Browse the repository at this point in the history
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
  • Loading branch information
Krishna2323 committed Dec 6, 2024
1 parent a19cc11 commit ccb5446
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/components/OptionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ function OptionRow({
const shouldUseShortFormInTooltip = (option.participantsList?.length ?? 0) > 1;
const firstIcon = option?.icons?.at(0);

// We only create tooltips for the first 10 users or so since some reports have hundreds of users, causing performance to degrade.
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips((option.participantsList ?? (option.accountID ? [option] : [])).slice(0, 10), shouldUseShortFormInTooltip);
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(option.participantsList ?? (option.accountID ? [option] : []), shouldUseShortFormInTooltip);
let subscriptColor = theme.appBG;
if (optionIsFocused) {
subscriptColor = focusedBackgroundColor;
Expand Down
8 changes: 1 addition & 7 deletions src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,7 @@ function getOptionData({
const status = personalDetail?.status ?? '';
const formattedLogin = Str.isSMSLogin(login) ? LocalePhoneNumber.formatPhoneNumber(login) : login;

// We only create tooltips for the first 10 users or so since some reports have hundreds of users, causing performance to degrade.
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(
(participantPersonalDetailList || []).slice(0, 10),
hasMultipleParticipants,
undefined,
ReportUtils.isSelfDM(report),
);
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(participantPersonalDetailList || [], hasMultipleParticipants, undefined, ReportUtils.isSelfDM(report));

// If the last actor's details are not currently saved in Onyx Collection,
// then try to get that from the last report action if that action is valid
Expand Down

0 comments on commit ccb5446

Please sign in to comment.