Skip to content

Commit

Permalink
revert isArchivedRoom
Browse files Browse the repository at this point in the history
  • Loading branch information
cretadn22 committed Aug 9, 2024
1 parent 11516db commit 26e0ad6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ function getOptionData({
hasParentAccess: undefined,
isIOUReportOwner: null,
isChatRoom: false,
isArchivedRoom: false,
// eslint-disable-next-line @typescript-eslint/naming-convention
private_isArchived: undefined,
shouldShowSubscript: false,
Expand All @@ -302,6 +303,8 @@ function getOptionData({
result.isTaskReport = ReportUtils.isTaskReport(report);
result.isInvoiceReport = ReportUtils.isInvoiceReport(report);
result.parentReportAction = parentReportAction;
const reportNameValuePairs = ReportUtils.getReportNameValuePairs(report?.reportID);
result.isArchivedRoom = ReportUtils.isArchivedRoom(report, reportNameValuePairs);
// eslint-disable-next-line @typescript-eslint/naming-convention
result.private_isArchived = report.private_isArchived;
result.isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(report);
Expand Down Expand Up @@ -390,8 +393,8 @@ function getOptionData({

const isThreadMessage =
ReportUtils.isThread(report) && lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT && lastAction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
const reportNameValuePairs = ReportUtils.getReportNameValuePairs(report?.reportID);
if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !ReportUtils.isArchivedRoom(report, reportNameValuePairs)) {

if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !result.isArchivedRoom) {
const lastActionName = lastAction?.actionName ?? report.lastActionType;

if (ReportActionsUtils.isRenamedAction(lastAction)) {
Expand Down

0 comments on commit 26e0ad6

Please sign in to comment.