Skip to content

Commit

Permalink
Merge pull request Expensify#23938 from hoangzinh/df/23309
Browse files Browse the repository at this point in the history
Fix Tasks assigned disappears from LHN when leaving the chat in focus mode
  • Loading branch information
cristipaval authored Aug 2, 2023
2 parents 6a38341 + 2492066 commit 05b9df9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,10 @@ function isWaitingForIOUActionFromCurrentUser(report, allReportsDict = null) {
return false;
}

function isWaitingForTaskCompleteFromAssignee(report) {
return isTaskReport(report) && isTaskAssignee(report) && isOpenTaskReport(report);
}

/**
* @param {Object} report
* @param {Object} allReportsDict
Expand Down Expand Up @@ -2304,9 +2308,8 @@ function shouldReportBeInOptionList(report, currentReportId, isInGSDMode, iouRep
return true;
}

// Include reports if they have a draft or have an outstanding IOU
// These are always relevant to the user no matter what view mode the user prefers
if (report.hasDraft || isWaitingForIOUActionFromCurrentUser(report, iouReports)) {
// Include reports that are relevant to the user in any view mode. Criteria include having a draft, having an outstanding IOU, or being assigned to an open task.
if (report.hasDraft || isWaitingForIOUActionFromCurrentUser(report, iouReports) || isWaitingForTaskCompleteFromAssignee(report)) {
return true;
}

Expand Down

0 comments on commit 05b9df9

Please sign in to comment.