Use the connectivity-status library from the repository rather than the local copy
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
@ -5,7 +5,7 @@ import bou.amine.apps.readerforselfossv2.rest.SelfossModel
|
||||
import bou.amine.apps.readerforselfossv2.service.ApiDetailsService
|
||||
import bou.amine.apps.readerforselfossv2.utils.DateUtils
|
||||
import bou.amine.apps.readerforselfossv2.utils.ItemType
|
||||
import com.github.`ln-12`.library.ConnectivityStatus
|
||||
import com.github.ln_12.library.ConnectivityStatus
|
||||
import com.russhwolf.settings.Settings
|
||||
import io.github.aakira.napier.Napier
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
@ -342,20 +342,5 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
|
||||
|
||||
fun isNetworkAvailable() = isConnectionAvailable.value && !offlineOverride
|
||||
|
||||
// TODO: Start and stop the monitoring within Android and iOS code
|
||||
// This should be performed in the architecture specific code
|
||||
// However it is not possible on android due to the dash contained in the name of the library
|
||||
// com.github.ln-12:multiplatform-connectivity-status:1.1.0
|
||||
// https://github.com/ln-12/multiplatform-connectivity-status/issues/2
|
||||
fun startNetwork() {
|
||||
connectionMonitored = true
|
||||
connectivityStatus.start()
|
||||
}
|
||||
|
||||
fun stopNetwork() {
|
||||
connectionMonitored = false
|
||||
connectivityStatus.stop()
|
||||
}
|
||||
|
||||
// TODO: Handle offline actions
|
||||
}
|
Reference in New Issue
Block a user