Skip to content

Commit

Permalink
fix: show tooltip for all type of chats and remove tooltips limit.
Browse files Browse the repository at this point in the history
Signed-off-by: krishna2323 <[email protected]>
  • Loading branch information
Krishna2323 committed Nov 26, 2024
1 parent bdb8268 commit 902806b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,6 @@ function BaseSelectionList<TItem extends ListItem>(
const isDisabled = !!section.isDisabled || item.isDisabled;
const isItemFocused = (!isDisabled || item.isSelected) && focusedIndex === normalizedIndex;
const isItemHighlighted = !!itemsToHighlight?.has(item.keyForList ?? '');
// We only create tooltips for the first 10 users or so since some reports have hundreds of users, causing performance to degrade.
const showTooltip = shouldShowTooltips && normalizedIndex < 10;

return (
<View onLayout={(event: LayoutChangeEvent) => onItemLayout(event, item?.keyForList)}>
Expand All @@ -503,7 +501,7 @@ function BaseSelectionList<TItem extends ListItem>(
index={index}
isFocused={isItemFocused}
isDisabled={isDisabled}
showTooltip={showTooltip}
showTooltip={shouldShowTooltips}
canSelectMultiple={canSelectMultiple}
onLongPressRow={onLongPressRow}
shouldSingleExecuteRowSelect={shouldSingleExecuteRowSelect}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ function getHeaderMessageForNonUserList(hasSelectableOptions: boolean, searchVal
* Helper method to check whether an option can show tooltip or not
*/
function shouldOptionShowTooltip(option: ReportUtils.OptionData): boolean {
return (!option.isChatRoom || !!option.isThread) && !option.private_isArchived;
return !option.private_isArchived;
}

/**
Expand Down
5 changes: 1 addition & 4 deletions src/pages/home/HeaderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
/>
) : (
<OfflineWithFeedback pendingAction={report?.pendingFields?.avatar}>
<MultipleAvatars
icons={icons}
shouldShowTooltip={!isChatRoom || isChatThread}
/>
<MultipleAvatars icons={icons} />
</OfflineWithFeedback>
)}
<View
Expand Down

0 comments on commit 902806b

Please sign in to comment.