mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
chore(reader): Adjust error handler for webtoon too
This commit is contained in:
parent
9322836e48
commit
95504d7582
1 changed files with 7 additions and 2 deletions
|
@ -23,6 +23,7 @@ import eu.kanade.tachiyomi.util.system.dpToPx
|
|||
import eu.kanade.tachiyomi.util.system.launchIO
|
||||
import eu.kanade.tachiyomi.util.system.withIOContext
|
||||
import eu.kanade.tachiyomi.util.system.withUIContext
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
|
@ -202,8 +203,12 @@ class WebtoonPageHolder(
|
|||
)
|
||||
removeErrorLayout()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Logger.e(e) { "Unable to load page" }
|
||||
} catch (e: Throwable) {
|
||||
val logMsg = "Failed to set reader page image"
|
||||
if (e is CancellationException)
|
||||
Logger.w(e) { logMsg } // probably user exiting the reader page before the image loads
|
||||
else
|
||||
Logger.e(e) { logMsg }
|
||||
withUIContext {
|
||||
setError()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue