Skip to content

Commit 9c900ce

Browse files
committed
remove isNotifiableReportAction
1 parent 87ec600 commit 9c900ce

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
@@ -1376,17 +1376,6 @@ function isReportActionAttachment(reportAction: OnyxInputOrEntry<ReportAction>):
13761376
return false;
13771377
}
13781378

1379-
// eslint-disable-next-line rulesdir/no-negated-variables
1380-
function isNotifiableReportAction(reportAction: OnyxEntry<ReportAction>): boolean {
1381-
if (!reportAction) {
1382-
return false;
1383-
}
1384-
1385-
const actions: ReportActionName[] = [CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT, CONST.REPORT.ACTIONS.TYPE.IOU, CONST.REPORT.ACTIONS.TYPE.MODIFIED_EXPENSE];
1386-
1387-
return actions.includes(reportAction.actionName);
1388-
}
1389-
13901379
// We pass getReportName as a param to avoid cyclic dependency.
13911380
function getMemberChangeMessageElements(reportAction: OnyxEntry<ReportAction>, getReportNameCallback: typeof getReportName): readonly MemberChangeMessageElement[] {
13921381
const isInviteAction = isInviteMemberAction(reportAction);
@@ -3058,7 +3047,6 @@ export {
30583047
isModifiedExpenseAction,
30593048
isMovedTransactionAction,
30603049
isMoneyRequestAction,
3061-
isNotifiableReportAction,
30623050
isOldDotReportAction,
30633051
isPayAction,
30643052
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)