network #28
+1
-1
@@ -43,7 +43,7 @@ class LoadingWorker(val context: Context, params: WorkerParameters) : Worker(con
|
||||
override fun doWork(): Result {
|
||||
val settings = Settings()
|
||||
val periodicRefresh = settings.getBoolean("periodic_refresh", false)
|
||||
if (periodicRefresh) {
|
||||
if (periodicRefresh && repository.isNetworkAvailable()) {
|
||||
|
AmineB marked this conversation as resolved
Outdated
|
||||
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
val notificationManager =
|
||||
|
AmineB marked this conversation as resolved
Outdated
AmineB
commented
I think that this should be the only place where the connectivity check should stay like this. If there is no network connectivity, you don't do anything in the background. I think that this should be the only place where the connectivity check should stay like this.
If there is no network connectivity, you don't do anything in the background.
|
||||
|
500 Internal Server Error
Gitea Version: 1.28.0+dev-211-ga30d865b78 | ||||
This should be reverted to the old network status check, because the network availability watcher should be stopped when the app is in the background.