network #28
@ -322,7 +322,8 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
|
||||
|
||||
suspend fun updateRemote(): Boolean {
|
||||
var response = false
|
||||
AmineB marked this conversation as resolved
Outdated
|
||||
if (isConnectionAvailable.value && !offlineOverride) {
|
||||
offlineOverride = false
|
||||
AmineB marked this conversation as resolved
Outdated
AmineB
commented
It's weird to have this here. If There is no need for an exception for this method. It's weird to have this here. `offlineOverride` shouldn't be overridden from inside the repository.
If `offlineOverride` is `true` then return `false`.
There is no need for an exception for this method.
|
||||
if (isConnectionAvailable.value) {
|
||||
response = api.update()?.isSuccess == true
|
||||
}
|
||||
return response
|
||||
|
Loading…
Reference in New Issue
Block a user
This should use the same
isNetworkAvailable()
function as the others.And it can be refactored as the ones before.