Logout even if the logout response doesnt return ok
This commit is contained in:
parent
09ea9deb67
commit
dee3abd0c3
@ -211,6 +211,7 @@ class MangaDex(delegate: HttpSource, val context: Context) :
|
||||
override suspend fun logout(): Boolean {
|
||||
val result = try {
|
||||
loginHelper.logout()
|
||||
true
|
||||
} catch (e: NoSessionException) {
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
|
@ -61,7 +61,9 @@ class MangaDexLoginHelper(val authServiceLazy: Lazy<MangaDexAuthService>, val pr
|
||||
return login(username, password)
|
||||
}
|
||||
|
||||
suspend fun logout(): Boolean {
|
||||
return authService.logout().result == "ok"
|
||||
suspend fun logout() {
|
||||
return withIOContext {
|
||||
authService.logout()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user