Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ import {
isTaskAction,
isThreadParentMessage,
isUnapprovedAction,
isWhisperAction,
shouldReportActionBeVisible,
} from './ReportActionsUtils';
import {
Expand Down Expand Up @@ -419,7 +418,6 @@ Onyx.connect({
const reportActionsForDisplay = sortedReportActions.filter(
(reportAction, actionKey) =>
shouldReportActionBeVisible(reportAction, actionKey, isWriteActionAllowed) &&
!isWhisperAction(reportAction) &&
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.CREATED &&
reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
);
Expand Down Expand Up @@ -956,7 +954,7 @@ function createOption(accountIDs: number[], personalDetails: OnyxInputOrEntry<Pe
const lastAction = lastVisibleReportActions[report.reportID];
// lastActorAccountID can be an empty string
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const lastActorAccountID = report.lastActorAccountID || lastAction?.actorAccountID;
const lastActorAccountID = lastAction?.actorAccountID || report.lastActorAccountID;
const lastActorDetails = lastActorAccountID ? (personalDetails?.[lastActorAccountID] ?? null) : null;
const lastActorDisplayName = getLastActorDisplayName(lastActorDetails);
const lastMessageTextFromReport = getLastMessageTextForReport(report, lastActorDetails, undefined, reportNameValuePairs);
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ function shouldReportActionBeVisibleAsLastAction(reportAction: OnyxInputOrEntry<
// If the action's message text is empty and it is not a deleted parent with visible child actions, hide it. Else, consider the action to be displayable.
return (
shouldReportActionBeVisible(reportAction, reportAction.reportActionID, canUserPerformWriteAction) &&
!(isWhisperAction(reportAction) && !isReportPreviewAction(reportAction) && !isMoneyRequestAction(reportAction)) &&
(!(isWhisperAction(reportAction) && !isReportPreviewAction(reportAction) && !isMoneyRequestAction(reportAction)) || isActionableMentionWhisper(reportAction)) &&
!(isDeletedAction(reportAction) && !isDeletedParentAction(reportAction))
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ function getOptionData({
const lastAction = visibleReportActionItems[report.reportID];
// lastActorAccountID can be an empty string
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const lastActorAccountID = report.lastActorAccountID || lastAction?.actorAccountID;
const lastActorAccountID = lastAction?.actorAccountID || report.lastActorAccountID;
// 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
// to get data from.
Expand Down