From 20588aab8147357f3d42cb7dc135fe1a43cbf1ac Mon Sep 17 00:00:00 2001 From: davidoskky Date: Sat, 20 Aug 2022 21:28:21 +0200 Subject: [PATCH] Add comment to remember the problem with the connectivity-status library --- androidApp/build.gradle.kts | 1 + .../apps/readerforselfossv2/repository/RepositoryImpl.kt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 654a4a5..28281e1 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -206,5 +206,6 @@ dependencies { implementation("android.arch.work:work-runtime-ktx:1.0.1") // Network information + // TODO: When updating this library, check if the todo in RepositoryImpl.startNetwork can be resolved implementation("com.github.ln-12:multiplatform-connectivity-status:1.1.0") } \ No newline at end of file diff --git a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt index a12bcb2..57c702b 100644 --- a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt +++ b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt @@ -341,6 +341,11 @@ 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() { connectivityStatus.start() }