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 (cherry picked from commit 85af8ea5175de5aef7ad5ec297525c4d889a6fde)
This commit is contained in:
parent
9d1b4bf2ec
commit
639a2a9c38
@ -1517,6 +1517,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 ->
|
||||||
@ -1646,13 +1654,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