Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preload function doesn't call resolve #175

Closed
daesign-dev opened this issue Jul 11, 2018 · 2 comments
Closed

preload function doesn't call resolve #175

daesign-dev opened this issue Jul 11, 2018 · 2 comments
Labels

Comments

@daesign-dev
Copy link

image-loader.ts

if (this.shouldIndex) {
                this.addFileToIndex(file).then(() => {
                  this.getCachedImagePath(currentItem.imageUrl).then((localUrl) => {
                    currentItem.resolve(localUrl);
                    resolve();
                    done();
                    this.maintainCacheSize();
                  });
                });
}

If we don't want to limit cache size or duration, resolve() never call. Can we add :

if (this.shouldIndex) {
                this.addFileToIndex(file).then(() => {
                  this.getCachedImagePath(currentItem.imageUrl).then((localUrl) => {
                    currentItem.resolve(localUrl);
                    resolve();
                    done();
                    this.maintainCacheSize();
                  });
                });
}

// Add this ?
else
{
     currentItem.resolve(localUrl);
     resolve();
     done();
}
@eduardoRoth
Copy link
Member

@daesign-dev this is already fixed in PR #171

We're waiting for @ihadeed to review it and merge to master branch.

@danielsogl
Copy link
Contributor

Closes with #171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants