From c1976ef5999897543d9072d86016030c990e52f2 Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 14 Apr 2022 18:28:16 -0400 Subject: [PATCH] Avoid some crashes --- .../java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt | 2 +- .../eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt index b4103a7e5..6d4f72078 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt @@ -36,7 +36,7 @@ data class DownloadHeaderItem( override fun equals(other: Any?): Boolean { if (this === other) return true if (other is DownloadHeaderItem) { - return name == other.name + return id == other.id && name == other.name } return false } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt index 7e97847da..be427bab3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt @@ -110,7 +110,7 @@ open class ReaderPageImageView @JvmOverloads constructor( private fun SubsamplingScaleImageView.landscapeZoom(forward: Boolean) { if (config != null && config!!.landscapeZoom && config!!.minimumScaleType == SCALE_TYPE_CENTER_INSIDE && sWidth > sHeight && scale == minScale) { - handler.postDelayed({ + handler?.postDelayed({ val point = when (config!!.zoomStartPosition) { ZoomStartPosition.LEFT -> if (forward) PointF(0F, 0F) else PointF(sWidth.toFloat(), 0F) ZoomStartPosition.RIGHT -> if (forward) PointF(sWidth.toFloat(), 0F) else PointF(0F, 0F)