Update error details dialog
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user