Skip to content

Commit fa5b17c

Browse files
committed
Add missing properties in OSNotification constructor
- `OSNotification(OSNotification notification)` is used as the constructor for `OSMutableNotification` - `ttl` and `sentTime` were missing from this constructor so that these values defaulted to 0, leading to some problems with determining ttl logic later. - Unrelated to what this PR is going to address, but also added `smallIcon` here since that was also missing.
1 parent 3564fca commit fa5b17c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OSNotification.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ protected OSNotification(OSNotification notification) {
117117
this.title = notification.title;
118118
this.body = notification.body;
119119
this.additionalData = notification.additionalData;
120+
this.smallIcon = notification.smallIcon;
120121
this.largeIcon = notification.largeIcon;
121122
this.bigPicture = notification.bigPicture;
122123
this.smallIconAccentColor = notification.smallIconAccentColor;
@@ -132,6 +133,8 @@ protected OSNotification(OSNotification notification) {
132133
this.collapseId = notification.collapseId;
133134
this.priority = notification.priority;
134135
this.rawPayload = notification.rawPayload;
136+
this.sentTime = notification.sentTime;
137+
this.ttl = notification.ttl;
135138
}
136139

137140
private void initPayloadData(JSONObject currentJsonPayload) {

0 commit comments

Comments
 (0)