When we are already on the main thread, there is no need to post listeners to the main thread again.
As a side effect, this fixes https://github.com/airbnb/lottie-android/issues/2449. The listener was called twice because it was called synchronously in addListener because it was already done and then because of the post, it was called again.
When we are already on the main thread, there is no need to post listeners to the main thread again.
As a side effect, this fixes https://github.com/airbnb/lottie-android/issues/2449. The listener was called twice because it was called synchronously in addListener because it was already done and then because of the post, it was called again.
Fixes https://github.com/airbnb/lottie-android/issues/2449