mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	More crash fixes
This commit is contained in:
		@@ -185,7 +185,7 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
 | 
			
		||||
     * activity of the change and requests the preload of the next chapter if this is the last page.
 | 
			
		||||
     */
 | 
			
		||||
    private fun onReaderPageSelected(page: ReaderPage, allowPreload: Boolean) {
 | 
			
		||||
        val pages = page.chapter.pages!! // Won't be null because it's the loaded chapter
 | 
			
		||||
        val pages = page.chapter.pages ?: return
 | 
			
		||||
        Timber.d("onReaderPageSelected: ${page.number}/${pages.size}")
 | 
			
		||||
        activity.onPageSelected(page)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -185,7 +185,7 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr
 | 
			
		||||
     * activity of the change and requests the preload of the next chapter if this is the last page.
 | 
			
		||||
     */
 | 
			
		||||
    private fun onPageSelected(page: ReaderPage, allowPreload: Boolean) {
 | 
			
		||||
        val pages = page.chapter.pages!! // Won't be null because it's the loaded chapter
 | 
			
		||||
        val pages = page.chapter.pages ?: return
 | 
			
		||||
        Timber.d("onPageSelected: ${page.number}/${pages.size}")
 | 
			
		||||
        activity.onPageSelected(page)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -101,7 +101,7 @@ object SettingsSearchHelper {
 | 
			
		||||
            (pref.title != null) -> {
 | 
			
		||||
                // Is an actual preference
 | 
			
		||||
                val title = pref.title.toString()
 | 
			
		||||
                val summary = if (pref.summary != null) pref.summary.toString() else ""
 | 
			
		||||
                val summary = pref.summary?.toString() ?: ""
 | 
			
		||||
                val breadcrumbsStr = addLocalizedBreadcrumb(breadcrumbs, "${pref.title}")
 | 
			
		||||
 | 
			
		||||
                prefSearchResultList.add(
 | 
			
		||||
 
 | 
			
		||||
@@ -31,6 +31,7 @@ open class BaseWebViewActivity : BaseActivity<WebviewActivityBinding>() {
 | 
			
		||||
        if (!WebViewUtil.supportsWebView(this)) {
 | 
			
		||||
            toast(R.string.information_webview_required, Toast.LENGTH_LONG)
 | 
			
		||||
            finish()
 | 
			
		||||
            return
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
@@ -40,6 +41,7 @@ open class BaseWebViewActivity : BaseActivity<WebviewActivityBinding>() {
 | 
			
		||||
            // Potentially throws errors like "Error inflating class android.webkit.WebView"
 | 
			
		||||
            toast(R.string.information_webview_required, Toast.LENGTH_LONG)
 | 
			
		||||
            finish()
 | 
			
		||||
            return
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        title = intent.extras?.getString(TITLE_KEY)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user