Skip to content

Commit

Permalink
Merge pull request #771 from OneSignal/fix/clearTriggers_on_android
Browse files Browse the repository at this point in the history
Fix clearTriggers on Android
  • Loading branch information
emawby authored Oct 24, 2023
2 parents 7778352 + 45287e8 commit b5fbd14
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ else if (call.method.contentEquals("OneSignal#removeTrigger"))
this.removeTrigger(call, result);
else if (call.method.contentEquals("OneSignal#removeTriggers"))
this.removeTriggers(call, result);
else if (call.method.contentEquals("OneSignal#clearTriggers"))
this.clearTriggers(call, result);
else if (call.method.contentEquals("OneSignal#arePaused"))
replySuccess(result, OneSignal.getInAppMessages().getPaused());
else if (call.method.contentEquals("OneSignal#paused"))
Expand Down Expand Up @@ -81,6 +83,11 @@ private void removeTriggers(MethodCall call, Result result) {
}
}

private void clearTriggers(MethodCall call, Result result) {
OneSignal.getInAppMessages().clearTriggers();
replySuccess(result, null);
}

private void paused(MethodCall call, Result result) {
OneSignal.getInAppMessages().setPaused((boolean) call.arguments);
replySuccess(result, null);
Expand Down

0 comments on commit b5fbd14

Please sign in to comment.