Consider offline override before updating remote

This commit is contained in:
davidoskky 2022-08-20 21:12:39 +02:00
parent 8949f78177
commit 99b34cfa41

View File

@ -298,13 +298,8 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
return success
}
suspend fun updateRemote(): Boolean {
var response = false
if (isConnectionAvailable.value) {
response = api.update()?.isSuccess == true
}
return response
}
suspend fun updateRemote(): Boolean =
isNetworkAvailable() && api.update()?.isSuccess == true
suspend fun login(): Boolean {
var result = false