pusher / push-notifications-android

Android SDK for Pusher Beams
https://www.pusher.com/beams
MIT License
21 stars 22 forks source link

Fix incorrect boolean logic in replaceAllInterestsInStore. #60

Closed julioromano closed 5 years ago

julioromano commented 5 years ago

a.containsAll(b) && b.containsAll(a) is true only when a and b are equals (i.e. contains the same elements). An additional ! is needed if willing to find out whether a and b are different.

This should fix https://github.com/pusher/push-notifications-android/issues/56 and similar issues.

julioromano commented 5 years ago

I can confirm this fixes https://github.com/pusher/push-notifications-android/issues/56 Tested with a local build. I'm not sure why bitrise build fails. I can't access its details.

julioromano commented 5 years ago

Should also fix https://github.com/pusher/push-notifications-android/issues/57

luismfonseca commented 5 years ago

@julioromano thanks for the PR! I'll look into this.

The CI is failing as we are doing a major refactoring work on a separate branch and now rely on virtual-device-testing-for-android for more realistic tests.

julioromano commented 5 years ago

Thanks for reaching out! Do you think this fix can deserve a v1.0.2 release?

luismfonseca commented 5 years ago

Yes, you can use it now. :)