Skip to content

Commit

Permalink
Listen to clearTriggers on android
Browse files Browse the repository at this point in the history
  • Loading branch information
emawby committed Oct 23, 2023
1 parent 67a679a commit 004b6b3
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();
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 004b6b3

Please sign in to comment.