-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: missing avatars and names above IOU preview in main chat after login #42453
Changes from all commits
7957804
bf6a6e7
0f7a6ed
1dd2daf
16fea0b
159fce2
32f869d
9106ecf
e311c10
b2d9fe0
792ca7b
a2a7393
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -769,8 +769,11 @@ function isReportManager(report: OnyxEntry<Report>): boolean { | |
/** | ||
* Checks if the supplied report has been approved | ||
*/ | ||
function isReportApproved(reportOrID: OnyxInputOrEntry<Report> | string | EmptyObject): boolean { | ||
function isReportApproved(reportOrID: OnyxInputOrEntry<Report> | string | EmptyObject, parentReportAction: OnyxEntry<ReportAction> = undefined): boolean { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need to specifically set the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eVoloshchak Some other places we can use this function without There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this used in this PR? |
||
const report = typeof reportOrID === 'string' ? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportOrID}`] ?? null : reportOrID; | ||
if (!report) { | ||
return parentReportAction?.childStateNum === CONST.REPORT.STATE_NUM.APPROVED && parentReportAction?.childStatusNum === CONST.REPORT.STATUS_NUM.APPROVED; | ||
} | ||
return report?.stateNum === CONST.REPORT.STATE_NUM.APPROVED && report?.statusNum === CONST.REPORT.STATUS_NUM.APPROVED; | ||
} | ||
|
||
|
@@ -6883,7 +6886,7 @@ function canLeaveChat(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boo | |
function getReportActionActorAccountID(reportAction: OnyxInputOrEntry<ReportAction>, iouReport: OnyxInputOrEntry<Report> | undefined): number | undefined { | ||
switch (reportAction?.actionName) { | ||
case CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW: | ||
return iouReport ? iouReport.managerID : reportAction?.actorAccountID; | ||
return !isEmptyObject(iouReport) ? iouReport.managerID : reportAction?.childManagerAccountID; | ||
|
||
case CONST.REPORT.ACTIONS.TYPE.SUBMITTED: | ||
return reportAction?.adminAccountID ?? reportAction?.actorAccountID; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@youssef-lr We use it here.