fix 🐛 available cache percents callback

This commit is contained in:
Alexey Danilov
2015-09-28 11:31:02 +06:00
parent e135bf0b42
commit 6125478d27
8 changed files with 65 additions and 23 deletions

View File

@@ -43,9 +43,6 @@ class HttpProxyCache extends ProxyCache {
}
out.write(buffer, 0, readBytes);
offset += readBytes;
if (cache.isCompleted()) {
onCacheAvailable(100);
}
}
out.flush();
}
@@ -68,7 +65,7 @@ class HttpProxyCache extends ProxyCache {
}
@Override
protected void onCacheAvailable(int percents) {
protected void onCachePercentsAvailableChanged(int percents) {
if (listener != null) {
listener.onCacheAvailable(cache.file, source.url, percents);
}