Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
dprevost-LMI committed Nov 1, 2024
1 parent 95a66d6 commit 5eb55c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/react-native/src/types/NotificationAndroid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ export interface AndroidMessagingStyleMessage {
}


export enum DefaultActionId {
export enum CallTypeActionsDefaultActionId {
ANSWER = 'answer',
DECLINE = 'decline',
HANG_UP = 'hangUp',
Expand Down
12 changes: 6 additions & 6 deletions packages/react-native/src/validators/validateAndroidStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
AndroidStyle,
AndroidCallType,
CallStyleAction,
DefaultActionId,
CallTypeActionsDefaultActionId,
} from '../types/NotificationAndroid';
import { objectHasProperty, isArray, isBoolean, isNumber, isObject, isString } from '../utils';
import validateAndroidPressAction from './validateAndroidPressAction';
Expand Down Expand Up @@ -347,8 +347,8 @@ export function validateAndroidCallStyle(style: AndroidCallStyle): AndroidCallSt

switch (style.callTypeActions.callType) {
case AndroidCallType.INCOMING: {
const answerAction = validateCallStyleAction(style.callTypeActions.answerAction, DefaultActionId.ANSWER)
const declineAction = validateCallStyleAction(style.callTypeActions.declineAction, DefaultActionId.DECLINE)
const answerAction = validateCallStyleAction(style.callTypeActions.answerAction, CallTypeActionsDefaultActionId.ANSWER)
const declineAction = validateCallStyleAction(style.callTypeActions.declineAction, CallTypeActionsDefaultActionId.DECLINE)
return {
type: AndroidStyle.CALL,
person,
Expand All @@ -360,7 +360,7 @@ export function validateAndroidCallStyle(style: AndroidCallStyle): AndroidCallSt
};
}
case AndroidCallType.ONGOING: {
const hangUpAction = validateCallStyleAction(style.callTypeActions.hangUpAction, DefaultActionId.HANG_UP)
const hangUpAction = validateCallStyleAction(style.callTypeActions.hangUpAction, CallTypeActionsDefaultActionId.HANG_UP)
return {
type: AndroidStyle.CALL,
person,
Expand All @@ -371,8 +371,8 @@ export function validateAndroidCallStyle(style: AndroidCallStyle): AndroidCallSt
};
}
case AndroidCallType.SCREENING: {
const answerAction = validateCallStyleAction(style.callTypeActions.answerAction, DefaultActionId.ANSWER)
const hangUpAction = validateCallStyleAction(style.callTypeActions.hangUpAction, DefaultActionId.HANG_UP)
const answerAction = validateCallStyleAction(style.callTypeActions.answerAction, CallTypeActionsDefaultActionId.ANSWER)
const hangUpAction = validateCallStyleAction(style.callTypeActions.hangUpAction, CallTypeActionsDefaultActionId.HANG_UP)
return {
type: AndroidStyle.CALL,
person,
Expand Down

0 comments on commit 5eb55c1

Please sign in to comment.