Manually try authenticating mangadex logout, skip if it fails

This commit is contained in:
Jobobby04 2021-07-24 12:38:55 -04:00
parent d22b14734d
commit 464f2b01a1

View File

@ -71,7 +71,17 @@ class MangaDexLoginHelper(val authServiceLazy: Lazy<MangaDexAuthService>, val pr
suspend fun logout() {
return withIOContext {
authService.logout()
try {
if (isAuthenticated()) {
authService.logout()
} else {
if (refreshToken()) {
authService.logout()
}
}
} catch (e: Exception) {
if (e is CancellationException) throw e
}
}
}
}