Manually try authenticating mangadex logout, skip if it fails
This commit is contained in:
parent
d22b14734d
commit
464f2b01a1
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user