Skip to content

Commit

Permalink
Merge pull request #22500 from 0xmiroslav/fix/follow-up-21092
Browse files Browse the repository at this point in the history
fix missing style in thread subheader, tooltip issues
  • Loading branch information
grgia authored Jul 12, 2023
2 parents 8923cb0 + 13e1e76 commit 29ae942
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/UserDetailsTooltip/index.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function UserDetailsTooltip(props) {

let title = String(userDisplayName).trim() ? userDisplayName : '';
const subtitle = (userLogin || '').trim() && !_.isEqual(LocalePhoneNumber.formatPhoneNumber(userLogin || ''), userDisplayName) ? Str.removeSMSDomain(userLogin) : '';
if (props.icon && props.icon.type === CONST.ICON_TYPE_WORKSPACE) {
if (props.icon && (props.icon.type === CONST.ICON_TYPE_WORKSPACE || !title)) {
title = props.icon.name;
}
const renderTooltipContent = useCallback(
Expand Down
2 changes: 1 addition & 1 deletion src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ function getOptions(
userToInvite.icons = [
{
source: UserUtils.getAvatar('', optimisticAccountID),
login: searchValue,
name: searchValue,
type: CONST.ICON_TYPE_AVATAR,
},
];
Expand Down
6 changes: 3 additions & 3 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,13 +804,13 @@ function getWorkspaceIcon(report) {
* @param {Number} [defaultAccountID]
* @returns {Array<*>}
*/
function getIcons(report, personalDetails, defaultIcon = null, isPayer = false) {
function getIcons(report, personalDetails, defaultIcon = null, isPayer = false, defaultName = '', defaultAccountID = -1) {
if (_.isEmpty(report)) {
const fallbackIcon = {
source: defaultIcon || Expensicons.FallbackAvatar,
type: CONST.ICON_TYPE_AVATAR,
name: '',
id: -1,
name: defaultName,
id: defaultAccountID,
};
return [fallbackIcon];
}
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ function HeaderView(props) {
onPress={() => {
Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID));
}}
style={[styles.alignSelfStart, styles.mw100]}
accessibilityLabel={parentNavigationSubtitle}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.LINK}
>
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/report/ReactionList/BaseReactionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ function BaseReactionList(props) {
participantsList: [item],
icons: [
{
id: item.accountID,
source: UserUtils.getAvatar(item.avatar, item.accountID),
name: item.login,
type: CONST.ICON_TYPE_AVATAR,
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ function WorkspaceMembersPage(props) {
participantsList: [item],
icons: [
{
id: item.accountID,
source: UserUtils.getAvatar(item.avatar, item.accountID),
name: item.login,
type: CONST.ICON_TYPE_AVATAR,
Expand Down

0 comments on commit 29ae942

Please sign in to comment.