Skip to content

Commit

Permalink
Merge pull request #1363 from OneSignal/fix/iam_greater_than_time_tri…
Browse files Browse the repository at this point in the history
…gger

Fix greater than IAM trigger firing on same MS
  • Loading branch information
jkasten2 authored Jun 17, 2021
2 parents 260097d + 268a204 commit 17ac381
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ private static boolean evaluateTimeIntervalWithOperator(double timeInterval, dou
case LESS_THAN_OR_EQUAL_TO:
return currentTimeInterval <= timeInterval || roughlyEqual(timeInterval, currentTimeInterval);
case GREATER_THAN:
return currentTimeInterval > timeInterval;
// Counting equal as greater. This way we don't need to schedule a Runnable for 1ms in the future.
return currentTimeInterval >= timeInterval;
case GREATER_THAN_OR_EQUAL_TO:
return currentTimeInterval >= timeInterval || roughlyEqual(timeInterval, currentTimeInterval);
case EQUAL_TO:
Expand Down

0 comments on commit 17ac381

Please sign in to comment.