Show proper Exception message in MangaScreen (#8900)

Show proper Exception message in MangaScreen.
This commit is contained in:
Alessandro Jean 2023-01-12 19:45:38 -03:00 committed by GitHub
parent 82ea643c7d
commit 7329f03bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,7 +224,8 @@ class MangaInfoScreenModel(
logcat(LogPriority.ERROR, e)
coroutineScope.launch {
snackbarHostState.showSnackbar(message = e.toString())
val errorMessage = e.message.orEmpty().ifEmpty { e.toString() }
snackbarHostState.showSnackbar(message = errorMessage)
}
}
}
@ -542,7 +543,7 @@ class MangaInfoScreenModel(
context.getString(R.string.no_chapters_error)
} else {
logcat(LogPriority.ERROR, e)
e.toString()
e.message.orEmpty().ifEmpty { e.toString() }
}
coroutineScope.launch {