Hello guys,
I noticed event listeners started to behave wrong on Android and found a flawed code for getting pending events.
In PR #39 there is a commit containing this change in file android/airship-framework-proxy/src/main/java/com/urbanairship/android/framework/proxy/events/EventEmitter.kt
The code doesn't work as expected, it removes and returns ALL of the pending events (ignoring the given types).
The code snippet should look like this:
pendingEvents.removeAll { types.contains(it.type) && result.add(it) }
Hello guys, I noticed event listeners started to behave wrong on Android and found a flawed code for getting pending events.
In PR #39 there is a commit containing this change in file
android/airship-framework-proxy/src/main/java/com/urbanairship/android/framework/proxy/events/EventEmitter.kt
The code doesn't work as expected, it removes and returns ALL of the pending events (ignoring the given types).
The code snippet should look like this:
pendingEvents.removeAll { types.contains(it.type) && result.add(it) }
You can check a demonstration here in Kotlin Playground: https://pl.kotl.in/Ae27Yxg4a
Cheers