network #28
+2
-1
@@ -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
|
||||
|
500 Internal Server Error
Gitea Version: 1.28.0+dev-211-ga30d865b78 | ||||
This should use the same
isNetworkAvailable()function as the others.And it can be refactored as the ones before.