Albirew/tachiyomi
Archivé
1
0
Bifurcation 0

Trying to fix a backpressure issue (#17).

Cette révision appartient à :
inorichi 2016-01-05 18:47:25 +01:00
Parent 2f66b6e56c
révision dd833852ad
2 fichiers modifiés avec 4 ajouts et 4 suppressions

Voir le fichier

@ -147,14 +147,15 @@ public class ReaderPresenter extends BasePresenter<ReaderActivity> {
if (!isDownloaded) {
pageObservable = source.getAllImageUrlsFromPageList(pageList)
.flatMap(source::getCachedImage, 3);
.flatMap(source::getCachedImage, 2);
} else {
File chapterDir = downloadManager.getAbsoluteChapterDirectory(source, manga, chapter);
pageObservable = Observable.from(pageList)
.flatMap(page -> downloadManager.getDownloadedImage(page, chapterDir));
}
return pageObservable
return Observable.defer(() -> pageObservable)
.subscribeOn(Schedulers.io())
.onBackpressureBuffer()
.observeOn(AndroidSchedulers.mainThread());
}

Voir le fichier

@ -7,8 +7,6 @@
<item name="alertDialogTheme">@style/AlertDialogStyle</item>
<item name="android:itemTextAppearance">@style/OptionsMenuTextColor</item>
<item name="android:textColor">@color/primary_text</item>
<item name="android:textColorPrimary">@color/primary_text</item>
<item name="colorControlNormal">@color/white</item>
<item name="android:windowActionModeOverlay">true</item>
<item name="windowActionModeOverlay">true</item>
</style>
@ -19,6 +17,7 @@
<item name="android:spinnerItemStyle">@style/ActionBarSpinner</item>
<item name="android:actionModeBackground">@color/colorPrimarySuperDark</item>
<item name="actionModeBackground">@color/colorPrimarySuperDark</item>
<item name="colorControlNormal">@color/white</item>
</style>
<style name="AppTheme.Overlay.Dark" parent="ThemeOverlay.AppCompat.Dark.ActionBar">