urbanairship / airship-flutter

Flutter integration
Other
17 stars 17 forks source link

[MOBILE-3551] Remove the contact subscription to fix the switch state #166

Closed Apekka closed 1 year ago

Apekka commented 1 year ago

Following a customer issue where the Preference center at Contact level does not work properly

What do these changes do?

Before, when unsubscribing to a list, at a contact level, it only put an empty scope list as value, but the subscriptionId was still in the list. Since the switch button was checking if the subscriptionId is in the list, the switch stayed enabled

So I made a change to remove the subscriptionId if you unsubscribe to it.

I also added a "app" scope by default, because the SDK does not subscribe if there is no scope in the Contact subscriptions.

Why are these changes necessary?

To fix the Preference Center in Flutter

How did you verify these changes?

By running the sample app, and using the "preference_center" id, that is contact level