Selaa lähdekoodia

Drop progress emissions on backpressure

inorichi 9 vuotta sitten
vanhempi
commit
690684bacf

+ 1 - 0
app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/common/PagerReaderFragment.java

@@ -173,6 +173,7 @@ public class PagerReaderFragment extends BaseFragment {
         final AtomicInteger currentValue = new AtomicInteger(-1);
 
         progressSubscription = Observable.interval(75, TimeUnit.MILLISECONDS, Schedulers.newThread())
+                .onBackpressureDrop()
                 .observeOn(AndroidSchedulers.mainThread())
                 .subscribe(tick -> {
                     // Refresh UI only if progress change