-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding toJSONObject for push subscription changed event parameters
- Loading branch information
1 parent
0ae35e4
commit dd3feaa
Showing
2 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
11 changes: 10 additions & 1 deletion
11
...ignal/core/src/main/java/com/onesignal/user/subscriptions/PushSubscriptionChangedState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
package com.onesignal.user.subscriptions | ||
|
||
import org.json.JSONObject | ||
|
||
class PushSubscriptionChangedState( | ||
val previous: PushSubscriptionState, | ||
val current: PushSubscriptionState | ||
) | ||
) { | ||
fun toJSONObject(): JSONObject { | ||
return JSONObject() | ||
.put("previous", previous.toJSONObject()) | ||
.put("current", current.toJSONObject()) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters