File tree 3 files changed +11
-2
lines changed
android/src/main/java/com/sourcepoint/reactnativecmp
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ class RNSourcepointCmpModule internal constructor(context: ReactApplicationConte
119
119
override fun onAction (view : View , consentAction : ConsentAction ): ConsentAction {
120
120
sendEvent(SDKEvent .onAction, createMap().apply {
121
121
putString(" actionType" , RNSourcepointActionType .from(consentAction.actionType).name)
122
+ putString(" customActionId" , consentAction.customActionId ? : " " )
122
123
})
123
124
return consentAction
124
125
}
Original file line number Diff line number Diff line change @@ -69,7 +69,10 @@ extension RNSourcepointCmp: SPDelegate {
69
69
func onAction( _ action: SPAction , from controller: UIViewController ) {
70
70
RNSourcepointCmp . shared? . sendEvent (
71
71
withName: " onAction " ,
72
- body: [ " actionType " : RNSourcepointActionType ( from: action. type) . rawValue]
72
+ body: [
73
+ " actionType " : RNSourcepointActionType ( from: action. type) . rawValue,
74
+ " customActionId " : action. customActionId ?? " " ,
75
+ ]
73
76
)
74
77
}
75
78
Original file line number Diff line number Diff line change @@ -67,7 +67,12 @@ export class SPConsentManager implements Spec {
67
67
RNSourcepointCmp . loadUSNatPrivacyManager ( pmId ) ;
68
68
}
69
69
70
- onAction ( callback : ( body : { actionType : SPActionType } ) => void ) : void {
70
+ onAction (
71
+ callback : ( body : {
72
+ actionType : SPActionType ;
73
+ customActionId : string ;
74
+ } ) => void
75
+ ) : void {
71
76
this . emitter . removeAllListeners ( 'onAction' ) ;
72
77
this . emitter . addListener ( 'onAction' , callback ) ;
73
78
}
You can’t perform that action at this time.
0 commit comments