Show proper string in manga detail screen for SourceNotInstalledException
(cherry picked from commit 14d1bcacc9cba0e14cdf90a7972bf85660465c0b) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt
This commit is contained in:
parent
d91d53557a
commit
85af8ea517
@ -1490,6 +1490,14 @@ class MangaInfoScreenModel(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val Throwable.snackbarMessage: String
|
||||||
|
get() = when (val className = this::class.simpleName) {
|
||||||
|
null -> message ?: ""
|
||||||
|
"SourceNotInstalledException" -> context.getString(R.string.loader_not_implemented_error)
|
||||||
|
"Exception", "HttpException", "IOException" -> message ?: className
|
||||||
|
else -> "$className: $message"
|
||||||
|
}
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
fun showEditMangaInfoDialog() {
|
fun showEditMangaInfoDialog() {
|
||||||
mutableState.update { state ->
|
mutableState.update { state ->
|
||||||
@ -1601,13 +1609,6 @@ val chapterDecimalFormat = DecimalFormat(
|
|||||||
.apply { decimalSeparator = '.' },
|
.apply { decimalSeparator = '.' },
|
||||||
)
|
)
|
||||||
|
|
||||||
private val Throwable.snackbarMessage: String
|
|
||||||
get() = when (val className = this::class.simpleName) {
|
|
||||||
null -> message ?: ""
|
|
||||||
"Exception", "HttpException", "IOException", "SourceNotInstalledException" -> message ?: className
|
|
||||||
else -> "$className: $message"
|
|
||||||
}
|
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
sealed class PagePreviewState {
|
sealed class PagePreviewState {
|
||||||
object Unused : PagePreviewState()
|
object Unused : PagePreviewState()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user