mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:25:08 +01:00
Possibly fixing some freezes and crashes
This commit is contained in:
parent
1aebd3aced
commit
d3579706d3
@ -347,7 +347,7 @@ class MangaDetailsPresenter(
|
||||
* @param chapters the list of chapters to download.
|
||||
*/
|
||||
fun downloadChapters(chapters: List<ChapterItem>) {
|
||||
downloadManager.downloadChapters(manga, chapters)
|
||||
downloadManager.downloadChapters(manga, chapters.filter { !it.isDownloaded })
|
||||
}
|
||||
|
||||
fun restartDownloads() {
|
||||
|
@ -55,8 +55,9 @@ object ImageUtil {
|
||||
return null
|
||||
}
|
||||
|
||||
fun autoSetBackground(image: Bitmap, useWhiteAlways: Boolean): Drawable {
|
||||
fun autoSetBackground(image: Bitmap?, useWhiteAlways: Boolean): Drawable {
|
||||
val backgroundColor = if (useWhiteAlways) Color.WHITE else android.R.attr.colorBackground
|
||||
if (image == null) return ColorDrawable(backgroundColor)
|
||||
if (image.width < 50 || image.height < 50)
|
||||
return ColorDrawable(backgroundColor)
|
||||
val top = 5
|
||||
|
Loading…
Reference in New Issue
Block a user