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

fixed RN-0.43+bug #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ private void updateCacheSize(DiskStorageCache cache) throws NoSuchMethodExceptio

@ReactMethod
public void getImageCacheSize(Promise promise){
FileCache cache1 = ImagePipelineFactory.getInstance().getMainDiskStorageCache();
//FileCache cache1 = ImagePipelineFactory.getInstance().getMainDiskStorageCache();
FileCache cache1 = ImagePipelineFactory.getInstance().getMainFileCache(); // fixed RN-0.43+
long size1 = cache1.getSize();
if (size1 < 0){
try {
Expand All @@ -77,7 +78,8 @@ public void getImageCacheSize(Promise promise){
}
size1 = cache1.getSize();
}
FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageDiskStorageCache();
//FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageDiskStorageCache();
FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageFileCache(); //fixed RN-0.43+
long size2 = cache2.getSize();
if (size2 < 0){
try {
Expand Down