Skip to content

Commit b89da7a

Browse files
Resource Fetcher Set Callback to 1 when download is Finished (#486)
## Description Previously, if resources were already downloaded, callback could remain at 0. Now, always before returning ResourceFetcher sets the callback to 1. ### Introduces a breaking change? - [ ] Yes - [x] No ### Type of change - [x] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [ ] Documentation update (improves or adds clarity to existing documentation) - [ ] Other (chores, tests, code style improvements etc.) ### Tested on - [x] iOS - [ ] Android ### Testing instructions <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> ### Screenshots <!-- Add screenshots here, if applicable --> ### Related issues <!-- Link related issues here using #issue-number --> ### Checklist - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
1 parent ada8e44 commit b89da7a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/react-native-executorch/src/utils/ResourceFetcher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export class ResourceFetcher {
151151
nextSource.results.push(...sourceExtended.results);
152152
return this.singleFetch(nextSource);
153153
}
154+
sourceExtended.callback!(1);
154155
return sourceExtended.results;
155156
}
156157

0 commit comments

Comments
 (0)