Show proper Exception message in MangaScreen (#8900)

Show proper Exception message in MangaScreen.

(cherry picked from commit 7329f03bc5e6fa63723d8b19ef8a351916af3631)
This commit is contained in:
Alessandro Jean 2023-01-12 19:45:38 -03:00 committed by Jobobby04
parent a55e27c657
commit 3a9a1c631d

View File

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