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 {
|
override suspend fun logout(): Boolean {
|
||||||
val result = try {
|
val result = try {
|
||||||
loginHelper.logout()
|
loginHelper.logout()
|
||||||
|
true
|
||||||
} catch (e: NoSessionException) {
|
} catch (e: NoSessionException) {
|
||||||
true
|
true
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -61,7 +61,9 @@ class MangaDexLoginHelper(val authServiceLazy: Lazy<MangaDexAuthService>, val pr
|
|||||||
return login(username, password)
|
return login(username, password)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun logout(): Boolean {
|
suspend fun logout() {
|
||||||
return authService.logout().result == "ok"
|
return withIOContext {
|
||||||
|
authService.logout()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user