mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 21:41:50 +01:00
Fix more crashes
This commit is contained in:
parent
3dc4fd8dd1
commit
2b5e8241ab
@ -42,7 +42,7 @@ class CloudflareInterceptor(private val context: Context) : Interceptor {
|
|||||||
// Crashes on some devices. We skip this in some cases since the only impact is slower
|
// Crashes on some devices. We skip this in some cases since the only impact is slower
|
||||||
// WebView init in those rare cases.
|
// WebView init in those rare cases.
|
||||||
// See https://bugs.chromium.org/p/chromium/issues/detail?id=1279562
|
// See https://bugs.chromium.org/p/chromium/issues/detail?id=1279562
|
||||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.S && DeviceUtil.isSamsung) {
|
if (DeviceUtil.isMiui || Build.VERSION.SDK_INT == Build.VERSION_CODES.S && DeviceUtil.isSamsung) {
|
||||||
return@lazy
|
return@lazy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ class MangaController :
|
|||||||
|
|
||||||
private fun updateToolbarTitleAlpha(@FloatRange(from = 0.0, to = 1.0) alpha: Float? = null) {
|
private fun updateToolbarTitleAlpha(@FloatRange(from = 0.0, to = 1.0) alpha: Float? = null) {
|
||||||
// Controller may actually already be destroyed by the time this gets run
|
// Controller may actually already be destroyed by the time this gets run
|
||||||
binding ?: return
|
if (!isAttached) return
|
||||||
|
|
||||||
val scrolledList = binding.fullRecycler ?: binding.infoRecycler!!
|
val scrolledList = binding.fullRecycler ?: binding.infoRecycler!!
|
||||||
(activity as? MainActivity)?.binding?.appbar?.titleTextAlpha = when {
|
(activity as? MainActivity)?.binding?.appbar?.titleTextAlpha = when {
|
||||||
|
@ -33,7 +33,7 @@ class MangaFullCoverDialog : DialogController {
|
|||||||
private var disposable: Disposable? = null
|
private var disposable: Disposable? = null
|
||||||
|
|
||||||
private val mangaController
|
private val mangaController
|
||||||
get() = targetController as MangaController
|
get() = targetController as MangaController?
|
||||||
|
|
||||||
constructor(targetController: MangaController, manga: Manga) : super(bundleOf("mangaId" to manga.id)) {
|
constructor(targetController: MangaController, manga: Manga) : super(bundleOf("mangaId" to manga.id)) {
|
||||||
this.targetController = targetController
|
this.targetController = targetController
|
||||||
@ -53,9 +53,9 @@ class MangaFullCoverDialog : DialogController {
|
|||||||
setNavigationOnClickListener { dialog?.dismiss() }
|
setNavigationOnClickListener { dialog?.dismiss() }
|
||||||
setOnMenuItemClickListener {
|
setOnMenuItemClickListener {
|
||||||
when (it.itemId) {
|
when (it.itemId) {
|
||||||
R.id.action_share_cover -> mangaController.shareCover()
|
R.id.action_share_cover -> mangaController?.shareCover()
|
||||||
R.id.action_save_cover -> mangaController.saveCover()
|
R.id.action_save_cover -> mangaController?.saveCover()
|
||||||
R.id.action_edit_cover -> mangaController.changeCover()
|
R.id.action_edit_cover -> mangaController?.changeCover()
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user