mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Fix more crashes
This commit is contained in:
		| @@ -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 | ||||
|         // WebView init in those rare cases. | ||||
|         // 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 | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -339,7 +339,7 @@ class MangaController : | ||||
|  | ||||
|     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 | ||||
|         binding ?: return | ||||
|         if (!isAttached) return | ||||
|  | ||||
|         val scrolledList = binding.fullRecycler ?: binding.infoRecycler!! | ||||
|         (activity as? MainActivity)?.binding?.appbar?.titleTextAlpha = when { | ||||
|   | ||||
| @@ -33,7 +33,7 @@ class MangaFullCoverDialog : DialogController { | ||||
|     private var disposable: Disposable? = null | ||||
|  | ||||
|     private val mangaController | ||||
|         get() = targetController as MangaController | ||||
|         get() = targetController as MangaController? | ||||
|  | ||||
|     constructor(targetController: MangaController, manga: Manga) : super(bundleOf("mangaId" to manga.id)) { | ||||
|         this.targetController = targetController | ||||
| @@ -53,9 +53,9 @@ class MangaFullCoverDialog : DialogController { | ||||
|             setNavigationOnClickListener { dialog?.dismiss() } | ||||
|             setOnMenuItemClickListener { | ||||
|                 when (it.itemId) { | ||||
|                     R.id.action_share_cover -> mangaController.shareCover() | ||||
|                     R.id.action_save_cover -> mangaController.saveCover() | ||||
|                     R.id.action_edit_cover -> mangaController.changeCover() | ||||
|                     R.id.action_share_cover -> mangaController?.shareCover() | ||||
|                     R.id.action_save_cover -> mangaController?.saveCover() | ||||
|                     R.id.action_edit_cover -> mangaController?.changeCover() | ||||
|                 } | ||||
|                 true | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user