Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
Code review
  • Loading branch information
dprevost-LMI committed Oct 30, 2024
1 parent 25e4f5f commit 8f906ab
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ private static ListenableFuture<Person> getPerson(
public Bundle toBundle() {
return (Bundle) mNotificationAndroidStyleBundle.clone();
}

@SuppressLint("NewApi")

@Nullable
public ListenableFuture<NotificationCompat.Style> getStyleTask(
ListeningExecutorService lExecutor, int notificationHashCode) {
Expand Down
69 changes: 34 additions & 35 deletions packages/react-native/src/types/NotificationAndroid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,36 @@ export interface AndroidMessagingStyle {
group?: boolean;
}

/**
* The interface for messages when constructing a Messaging Style notification.
*
* <Vimeo id="android-style-messaging" caption="Android Messaging Style" />
*
* View the [`AndroidMessagingStyle`](/react-native/reference/androidmessagingstyle) reference
* and [Messaging](/react-native/docs/android/styles#messaging) documentation to learn more.
*
* @platform android
*/
export interface AndroidMessagingStyleMessage {
/**
* The content of the message.
*/
text: string;

/**
* The timestamp of when the message arrived in milliseconds.
*/
timestamp: number;

/**
* The sender of this message. See [`AndroidPerson`](/react-native/reference/androidperson) reference
* for more information on the properties available.
*
* This property should only be provided if the message is from an external person, and not the person receiving the message.
*/
person?: AndroidPerson;
}

export const enum AndroidCallType {
INCOMING = 1,
ONGOING = 2,
Expand All @@ -746,13 +776,12 @@ export interface AndroidCallTypeScreening {
hangUpAction: AndroidAction;
}


/**
* The interface used when displaying a Phone Style notification.
* The interface used when displaying a Call Style notification.
*
* <Vimeo id="android-style-messaging" caption="Android Messaging Style" />
* <Vimeo id="android-style-call" caption="Android Call Style" />
*
* View the [Messaging](/react-native/docs/android/styles#messaging) documentation to learn more.
* View the [Call](/react-native/docs/android/styles#call) documentation to learn more.
*
* @platform android
*/
Expand All @@ -763,7 +792,7 @@ export interface AndroidCallStyle {
type: AndroidStyle.CALL;

/**
* The person who is receiving a message on the current device.
* The person who is on the phone call.
*/
person: AndroidPerson;

Expand All @@ -773,36 +802,6 @@ export interface AndroidCallStyle {
callTypeActions: AndroidCallTypeIncoming | AndroidCallTypeOngoing | AndroidCallTypeScreening;
}

/**
* The interface for messages when constructing a Messaging Style notification.
*
* <Vimeo id="android-style-messaging" caption="Android Messaging Style" />
*
* View the [`AndroidMessagingStyle`](/react-native/reference/androidmessagingstyle) reference
* and [Messaging](/react-native/docs/android/styles#messaging) documentation to learn more.
*
* @platform android
*/
export interface AndroidMessagingStyleMessage {
/**
* The content of the message.
*/
text: string;

/**
* The timestamp of when the message arrived in milliseconds.
*/
timestamp: number;

/**
* The sender of this message. See [`AndroidPerson`](/react-native/reference/androidperson) reference
* for more information on the properties available.
*
* This property should only be provided if the message is from an external person, and not the person receiving the message.
*/
person?: AndroidPerson;
}

/**
* The interface used to describe a person shown in notifications.
*
Expand Down

0 comments on commit 8f906ab

Please sign in to comment.