Closed dsuresh-ap closed 3 years ago
Hi @dsuresh-ap,
clearAndApplyFlagUpdates
is supposed to override all flags (it's used when receiving a complete set of flags from the service, so we ignore any flag versions and trust that it's a consistent state) but we're planning on updating the SDK to track changes against the previously cached flags rather than the empty store post-clear. Thanks for reporting this, as it does effect the usefulness of the flag change listeners, I'll leave the issue open until we get change out that handle the flag change tracking when the cached flags are replaced.
Thanks, @gwhelanLD
Hi @dsuresh-ap,
The 3.0.0 release should address this issue. The SDK will now properly compare the new values received to the cached values even when receiving an entire flag value set from the LaunchDarkly service.
Thanks, @gwhelanLD
Describe the bug Backgrounding and foregrounding the app triggers
onFeatureFlagChange
for every listener. Is this intended since no flags actually changed. The flag update type when debugging shows asFlagStoreUpdateType.FLAG_CREATED
.To reproduce
.registerFeatureFlagListener
.Expected behavior No flags actually changed so
onFeatureFlagChange
should not trigger.Logs N/A
SDK version 2.12.0
Language version, developer tools Android Studio 4.1.2
OS/platform macOS 11.2.1
Additional context I see that the method being called is
public void clearAndApplyFlagUpdates(List<? extends FlagUpdate> flagUpdates)
which makes me feel like this is intentional.