Skip to content

Commit a6c2528

Browse files
authored
Merge pull request Expensify#68138 from Expensify/arosiclair-remove-notfiable-report-actions
Remove ReportActionUtils.isNotifiableReportAction
2 parents 79fea5e + 9c900ce commit a6c2528

3 files changed

Lines changed: 1 addition & 19 deletions

File tree

src/libs/ReportActionsUtils.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,17 +1374,6 @@ function isReportActionAttachment(reportAction: OnyxInputOrEntry<ReportAction>):
13741374
return false;
13751375
}
13761376

1377-
// eslint-disable-next-line rulesdir/no-negated-variables
1378-
function isNotifiableReportAction(reportAction: OnyxEntry<ReportAction>): boolean {
1379-
if (!reportAction) {
1380-
return false;
1381-
}
1382-
1383-
const actions: ReportActionName[] = [CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT, CONST.REPORT.ACTIONS.TYPE.IOU, CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE];
1384-
1385-
return actions.includes(reportAction.actionName);
1386-
}
1387-
13881377
// We pass getReportName as a param to avoid cyclic dependency.
13891378
function getMemberChangeMessageElements(reportAction: OnyxEntry<ReportAction>, getReportNameCallback: typeof getReportName): readonly MemberChangeMessageElement[] {
13901379
const isInviteAction = isInviteMemberAction(reportAction);
@@ -3055,7 +3044,6 @@ export {
30553044
isModifiedExpenseAction,
30563045
isMovedTransactionAction,
30573046
isMoneyRequestAction,
3058-
isNotifiableReportAction,
30593047
isOldDotReportAction,
30603048
isPayAction,
30613049
isPendingRemove,

src/libs/actions/Report.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,12 +3180,6 @@ function shouldShowReportActionNotification(reportID: string, action: ReportActi
31803180
return false;
31813181
}
31823182

3183-
// Only show notifications for supported types of report actions
3184-
if (action && !ReportActionsUtils.isNotifiableReportAction(action)) {
3185-
Log.info(`${tag} No notification because this action type is not supported`, false, {actionName: action?.actionName});
3186-
return false;
3187-
}
3188-
31893183
return true;
31903184
}
31913185

src/libs/actions/User.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ function triggerNotifications(onyxUpdates: OnyxServerUpdate[]) {
663663
const reportID = update.key.replace(ONYXKEYS.COLLECTION.REPORT_ACTIONS, '');
664664
const reportActions = Object.values((update.value as OnyxCollection<ReportAction>) ?? {});
665665

666-
reportActions.forEach((action) => action && ReportActionsUtils.isNotifiableReportAction(action) && showReportActionNotification(reportID, action));
666+
reportActions.forEach((action) => action && showReportActionNotification(reportID, action));
667667
});
668668
}
669669

0 commit comments

Comments
 (0)