Update error details dialog

This commit is contained in:
Koitharu
2023-03-11 17:17:41 +02:00
parent 072cdc35e8
commit 28e3f1c063
12 changed files with 75 additions and 46 deletions

View File

@@ -1,6 +1,5 @@
package org.koitharu.kotatsu.reader.ui.pager
import android.content.Context
import android.net.Uri
import androidx.core.net.toUri
import androidx.lifecycle.Observer
@@ -60,9 +59,9 @@ class PageHolderDelegate(
}
}
fun showErrorDetails(context: Context) {
fun showErrorDetails(url: String?) {
val e = error ?: return
ExceptionResolver.showDetails(context, e)
exceptionResolver.showDetails(e, url)
}
fun onAttachedToWindow() {

View File

@@ -115,7 +115,7 @@ open class PageHolder(
override fun onClick(v: View) {
when (v.id) {
R.id.button_retry -> delegate.retry(boundData?.toMangaPage() ?: return)
R.id.button_error_details -> delegate.showErrorDetails(v.context)
R.id.button_error_details -> delegate.showErrorDetails(boundData?.url)
}
}

View File

@@ -104,7 +104,7 @@ class WebtoonHolder(
override fun onClick(v: View) {
when (v.id) {
R.id.button_retry -> delegate.retry(boundData?.toMangaPage() ?: return)
R.id.button_error_details -> delegate.showErrorDetails(v.context)
R.id.button_error_details -> delegate.showErrorDetails(boundData?.url)
}
}