Skip to content

Conversation

@nzagorchev
Copy link
Contributor

What Where/Who
JIRA Issue SDK-351

Background

The onVariablesChangedAndNoDownloadsPending callback is executed twice on Start. The callback is executed from VarCache.Update and immediately from LeanplumRequest.NoPendingDownloads if there are no pending downloads.
The latter is executed on iOS and Android only if a downloadFile request is started. This differs from Unity Native where the handler is executed immediately when added to the LeanplumRequest if there are no Pending Downloads.

Implementation

Move the LeanplumRequest.NoPendingDownloads so it is executed only when there are pending downloads. Otherwise, the callback is executed from VarCache.Update, resulting in only 1 execution at Start.

Testing steps

Tested using an Asset File Variable to trigger download request at Start.

Is this change backwards-compatible?

@nzagorchev nzagorchev requested a review from milos1290 March 15, 2021 17:30
@nzagorchev nzagorchev merged commit aa1da2b into master Mar 16, 2021
@delete-merged-branch delete-merged-branch bot deleted the sdk-351-no-pending-downloads branch March 16, 2021 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants