mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 17:05:07 +01:00
Fixed rare crash when rotating screen in library
This commit is contained in:
parent
e2410fafb8
commit
950452579f
@ -1,5 +1,6 @@
|
|||||||
package eu.kanade.tachiyomi.ui.library
|
package eu.kanade.tachiyomi.ui.library
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
@ -78,6 +79,7 @@ class LibraryGridHolder(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setCover(manga: Manga, id: Long) {
|
private fun setCover(manga: Manga, id: Long) {
|
||||||
|
if ((adapter.recyclerView.context as? Activity)?.isDestroyed == true) return
|
||||||
GlideApp.with(adapter.recyclerView.context).load(manga)
|
GlideApp.with(adapter.recyclerView.context).load(manga)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
|
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
|
||||||
.signature(ObjectKey(MangaImpl.getLastCoverFetch(id).toString()))
|
.signature(ObjectKey(MangaImpl.getLastCoverFetch(id).toString()))
|
||||||
|
Loading…
Reference in New Issue
Block a user