Update to 5.6.1

This commit is contained in:
DrKLO 2019-05-14 15:08:05 +03:00
parent e397bd9afd
commit 2cf2a45aca
3181 changed files with 41027 additions and 27918 deletions

View file

@ -14,6 +14,7 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
private volatile boolean canceled;
private final Object sync = new Object();
private int lastOffset;
private boolean waitingForLoad;
public AnimatedFileDrawableStream(TLRPC.Document d, Object p, int a) {
document = d;
@ -46,7 +47,9 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
countDownLatch = new CountDownLatch(1);
}
FileLoader.getInstance(currentAccount).setLoadingVideo(document, false, true);
waitingForLoad = true;
countDownLatch.await();
waitingForLoad = false;
}
}
lastOffset = offset + availableLength;
@ -91,6 +94,10 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
return currentAccount;
}
public boolean isWaitingForLoad() {
return waitingForLoad;
}
@Override
public void newDataAvailable() {
if (countDownLatch != null) {