Skip to content

Commit 8f906ab

Browse files
committed
Code review
Code review
1 parent 25e4f5f commit 8f906ab

File tree

2 files changed

+35
-37
lines changed

2 files changed

+35
-37
lines changed

android/src/main/java/app/notifee/core/model/NotificationAndroidStyleModel.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ private static ListenableFuture<Person> getPerson(
118118
public Bundle toBundle() {
119119
return (Bundle) mNotificationAndroidStyleBundle.clone();
120120
}
121-
122-
@SuppressLint("NewApi")
121+
123122
@Nullable
124123
public ListenableFuture<NotificationCompat.Style> getStyleTask(
125124
ListeningExecutorService lExecutor, int notificationHashCode) {

packages/react-native/src/types/NotificationAndroid.ts

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,36 @@ export interface AndroidMessagingStyle {
723723
group?: boolean;
724724
}
725725

726+
/**
727+
* The interface for messages when constructing a Messaging Style notification.
728+
*
729+
* <Vimeo id="android-style-messaging" caption="Android Messaging Style" />
730+
*
731+
* View the [`AndroidMessagingStyle`](/react-native/reference/androidmessagingstyle) reference
732+
* and [Messaging](/react-native/docs/android/styles#messaging) documentation to learn more.
733+
*
734+
* @platform android
735+
*/
736+
export interface AndroidMessagingStyleMessage {
737+
/**
738+
* The content of the message.
739+
*/
740+
text: string;
741+
742+
/**
743+
* The timestamp of when the message arrived in milliseconds.
744+
*/
745+
timestamp: number;
746+
747+
/**
748+
* The sender of this message. See [`AndroidPerson`](/react-native/reference/androidperson) reference
749+
* for more information on the properties available.
750+
*
751+
* This property should only be provided if the message is from an external person, and not the person receiving the message.
752+
*/
753+
person?: AndroidPerson;
754+
}
755+
726756
export const enum AndroidCallType {
727757
INCOMING = 1,
728758
ONGOING = 2,
@@ -746,13 +776,12 @@ export interface AndroidCallTypeScreening {
746776
hangUpAction: AndroidAction;
747777
}
748778

749-
750779
/**
751-
* The interface used when displaying a Phone Style notification.
780+
* The interface used when displaying a Call Style notification.
752781
*
753-
* <Vimeo id="android-style-messaging" caption="Android Messaging Style" />
782+
* <Vimeo id="android-style-call" caption="Android Call Style" />
754783
*
755-
* View the [Messaging](/react-native/docs/android/styles#messaging) documentation to learn more.
784+
* View the [Call](/react-native/docs/android/styles#call) documentation to learn more.
756785
*
757786
* @platform android
758787
*/
@@ -763,7 +792,7 @@ export interface AndroidCallStyle {
763792
type: AndroidStyle.CALL;
764793

765794
/**
766-
* The person who is receiving a message on the current device.
795+
* The person who is on the phone call.
767796
*/
768797
person: AndroidPerson;
769798

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

776-
/**
777-
* The interface for messages when constructing a Messaging Style notification.
778-
*
779-
* <Vimeo id="android-style-messaging" caption="Android Messaging Style" />
780-
*
781-
* View the [`AndroidMessagingStyle`](/react-native/reference/androidmessagingstyle) reference
782-
* and [Messaging](/react-native/docs/android/styles#messaging) documentation to learn more.
783-
*
784-
* @platform android
785-
*/
786-
export interface AndroidMessagingStyleMessage {
787-
/**
788-
* The content of the message.
789-
*/
790-
text: string;
791-
792-
/**
793-
* The timestamp of when the message arrived in milliseconds.
794-
*/
795-
timestamp: number;
796-
797-
/**
798-
* The sender of this message. See [`AndroidPerson`](/react-native/reference/androidperson) reference
799-
* for more information on the properties available.
800-
*
801-
* This property should only be provided if the message is from an external person, and not the person receiving the message.
802-
*/
803-
person?: AndroidPerson;
804-
}
805-
806805
/**
807806
* The interface used to describe a person shown in notifications.
808807
*

0 commit comments

Comments
 (0)